注释原生插件
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 {
|
export default {
|
||||||
onLaunch: function () {
|
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')
|
console.log('App Launch')
|
||||||
try {
|
try {
|
||||||
if (!this.$store.state.app.token) uni.redirectTo({
|
if (!this.$store.state.app.token) uni.redirectTo({
|
||||||
@ -25,6 +14,17 @@ export default {
|
|||||||
url: '/pages/oaLogin/oaLogin'
|
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 () {
|
onShow: function () {
|
||||||
console.log('App Show')
|
console.log('App Show')
|
||||||
|
@ -199,14 +199,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
// #ifdef APP-PLUS
|
// // #ifdef APP-PLUS
|
||||||
jpushModule.initJPushService()
|
// jpushModule.initJPushService()
|
||||||
jpushModule.getRegistrationID(result => {
|
// jpushModule.getRegistrationID(result => {
|
||||||
// 绑定极光设备id
|
// // 绑定极光设备id
|
||||||
this.formData.register_id = result.registerID
|
// this.formData.register_id = result.registerID
|
||||||
console.log("设备----", this.formData)
|
// console.log("设备----", this.formData)
|
||||||
})
|
// })
|
||||||
// #endif
|
// // #endif
|
||||||
this.initTerminal();
|
this.initTerminal();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user