<script setup>
	import {
		onHide,
		onLaunch,
		onShow
	} from '@dcloudio/uni-app'
	import {
		storeToRefs
	} from 'pinia'
	import {
		useMainStore
	} from '@/store/store'
	const main = useMainStore()
	import {
		isWeixin,
		parseQuery
	} from '@/utils/util'
	import cookie from '@/utils/cookie'
	import {
		APP_ID
	} from '@/config'

	onLaunch((opt) => {
		console.log(opt, 'app.vue')
		//接收中鼐智能传过来的token
		//登录之后的操作
		if (opt.referrerInfo?.extraData?.accessToken) {
			const main = useMainStore()
			uni.setStorage({
				key: 'accessToken',
				data: opt.referrerInfo.extraData.accessToken
			});
			main.SET_TOKEN(opt.referrerInfo.extraData.accessToken);
		}
	})
</script>

<style lang="scss">
	@import '~@/static/style/app.scss';
	@import 'static/style/yshop.css';
</style>