<template>
	<view class="content">
	</view>
</template>

<script>
	import config from '../../static/config/index.js'
  import Order from '../../request/order/index'
  import User from '@/request/user'
	export default {
		data() {
			return {
				id:''
			}
		},
		onLoad(options) {
			this.id='';
			this.$store.commit('setOrderId','');
       if(options.q){
			   let url=decodeURIComponent(options.q);
			   this.id=url.split('/')[url.split('/').length-1];
			   this.$store.commit('setOrderId',this.id);
		   }
		},
		async onShow() {
			//  let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
			// let curRoute = routes[routes.length - 1].route //获取当前页面路由
			//   let curParam = routes[routes.length - 1].options;
			//  console.log(curParam)
			let Authorization=uni.getStorageSync(`Authorization`);
			let userInfo=uni.getStorageSync(`userInfo`);
			if(Authorization){  //
			   if(userInfo){
				   this.$store.commit('setUserInfo',userInfo);
			   }
				uni.reLaunch({
					url:'/pages/menu/menu'
				})
			}else{
				uni.removeStorageSync('Authorization');
				uni.removeStorageSync('userInfo');
				uni.reLaunch({
					url:'/pages/menu/menu'
				})
			}
		},
		methods: {
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>