<script>
	// var jpushModule = uni.requireNativePlugin("JG-JPush");
	var jpushModule = uni.requireNativePlugin("JG-JPush");

	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')
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import "static/css/base.css";
	@import "static/css/style.scss";

	view {
		box-sizing: border-box;
	}
</style>