<script>
	export default {
		onLaunch: function() {
			let _this = this;
			let token = uni.getStorageSync('token')
			console.log('判断登录状态',token)
			if (token) {
				//存在则关闭启动页进入首页
				// #ifdef APP-PLUS
				plus.navigator.closeSplashscreen()
				// #endif
			} else {
				//不存在则跳转至登录页
				uni.reLaunch({
					url: "/pages/index/login",
					success: () => {
						// #ifdef APP-PLUS
						plus.navigator.closeSplashscreen()
						// #endif
					}
				})
			}
			console.log('App Launch')
		},
		
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>
<style lang="scss">
	uni-toast{
		z-index: 10080; 
	}
</style>

