注释原生插件
This commit is contained in:
parent
db42a20197
commit
48cc112865
22
App.vue
22
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')
|
||||
|
@ -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();
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user