2023-07-15 17:27:06 +08:00
|
|
|
<script>
|
2023-08-18 16:03:25 +08:00
|
|
|
// var jpushModule = uni.requireNativePlugin("JG-JPush");
|
|
|
|
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
2023-08-16 16:51:41 +08:00
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
export default {
|
|
|
|
onLaunch: function() {
|
|
|
|
console.log('App Launch')
|
|
|
|
try {
|
|
|
|
if (!this.$store.state.app.token) uni.redirectTo({
|
|
|
|
url: '/pages/oaLogin/oaLogin'
|
|
|
|
})
|
|
|
|
} catch (e) {
|
|
|
|
uni.redirectTo({
|
|
|
|
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')
|
|
|
|
},
|
|
|
|
onHide: function() {
|
|
|
|
console.log('App Hide')
|
|
|
|
}
|
|
|
|
}
|
2023-07-15 17:27:06 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
2023-08-18 16:03:25 +08:00
|
|
|
/*每个页面公共css */
|
|
|
|
@import "static/css/base.css";
|
|
|
|
@import "static/css/style.scss";
|
2023-07-15 17:51:20 +08:00
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
view {
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
2023-08-16 16:51:41 +08:00
|
|
|
</style>
|