From 48cc112865340ec69104aab24e3ec7705d78ab3d Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Wed, 16 Aug 2023 17:36:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E5=8E=9F=E7=94=9F=E6=8F=92?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 22 +++++++++++----------- pages/oaLogin/oaLogin.vue | 16 ++++++++-------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/App.vue b/App.vue index e49385f..4ac58de 100644 --- a/App.vue +++ b/App.vue @@ -4,17 +4,6 @@ var jpushModule = uni.requireNativePlugin("JG-JPush"); export default { onLaunch: function () { - jpushModule.initJPushService() - const audioContext = uni.createInnerAudioContext() - audioContext.src = './static/mp3/order.mp3' - let ida = [0] - jpushModule.addNotificationListener(function (result) { - if (!ida.includes(result.messageID)) { - audioContext.play() - } - ida.push(result.messageID) - }) - console.log('App Launch') try { if (!this.$store.state.app.token) uni.redirectTo({ @@ -25,6 +14,17 @@ export default { url: '/pages/oaLogin/oaLogin' }) } + + // jpushModule.initJPushService() + // const audioContext = uni.createInnerAudioContext() + // audioContext.src = './static/mp3/order.mp3' + // let ida = [0] + // jpushModule.addNotificationListener(function (result) { + // if (!ida.includes(result.messageID)) { + // audioContext.play() + // } + // ida.push(result.messageID) + // }) }, onShow: function () { console.log('App Show') diff --git a/pages/oaLogin/oaLogin.vue b/pages/oaLogin/oaLogin.vue index 39b5e36..af45f4a 100644 --- a/pages/oaLogin/oaLogin.vue +++ b/pages/oaLogin/oaLogin.vue @@ -199,14 +199,14 @@ export default { } }, mounted () { - // #ifdef APP-PLUS - jpushModule.initJPushService() - jpushModule.getRegistrationID(result => { - // 绑定极光设备id - this.formData.register_id = result.registerID - console.log("设备----", this.formData) - }) - // #endif + // // #ifdef APP-PLUS + // jpushModule.initJPushService() + // jpushModule.getRegistrationID(result => { + // // 绑定极光设备id + // this.formData.register_id = result.registerID + // console.log("设备----", this.formData) + // }) + // // #endif this.initTerminal(); }