<script setup>
	import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
	import { onBeforeMount } from 'vue'
	
	// #ifdef APP
	import { useSystemStore } from '@/store/system.js';
	const systemStore = useSystemStore()
	// #endif
	
	import { useUserStore } from '@/store/user.js';
	const userStore = useUserStore();
	
	onLaunch(() => {
		console.log('App Launch')
		// #ifdef APP
		const appInfo = uni.getAppBaseInfo()
		systemStore.setAppInfo(appInfo)
		// #endif
	})
	
	onShow(() => {
		console.log('App Show')
	})
	
	onHide(() => {
		console.log('App Hide')
	})
	
	onBeforeMount(() => {
		const userInfo = uni.getStorageSync('uInfo')
		if (userInfo) {
			userStore.setUserInfo(JSON.parse(userInfo))
		}
	})
</script>

<style>
#app {
	min-height: 100vh;
	background-color: #efeff4;
	/* background-color: #000; */
	/* height: auto; */
}
</style>
