This commit is contained in:
weipengfei 2023-08-30 11:39:48 +08:00
parent 16805da789
commit d401ac77fc

View File

@ -294,6 +294,7 @@ export default {
this.showToask();
// this.initOaHomeDada();
this.getOrderList();
this.noticeFn();
// console.log(this.oaHomeData, this.oaHomeData.length==0);
if (this.oaHomeData.length == 0) {
this.$nextTick(() => {
@ -319,8 +320,18 @@ export default {
}
},
methods: {
test () {
this.$refs.globalPopup.showPopu();
//
noticeFn () {
const audioContext = uni.createInnerAudioContext()
audioContext.src = '/static/mp3/order.mp3'
jpushModule.addNotificationListener(res => {
if (res.notificationEventType == 'notificationOpened') return
audioContext.play()
uni.vibrateLong();
this.getOrderList()
this.$refs.globalPopup.showPopu();
console.log("index的监听")
})
},
async getOrderList () {
let id = JSON.parse(uni.getStorageSync("USER_INFO")).id || "";