<script>
	import { isLoggedIn } from '@/utils/auth'
	import { startGpsTimer } from '@/utils/gps'

	export default {
		onLaunch: function() {
			console.log('App Launch')
			// 退出或重新打开应用时，清除招募认证流程的暂存数据
			uni.removeStorageSync('recruit_form_data');
			uni.removeStorageSync('recruit_auth_data');
			uni.removeStorageSync('recruit_qual_data');

			// 已登录用户直接跳转首页，无需再进登录页
			if (isLoggedIn()) {
				startGpsTimer()
				uni.reLaunch({
					url: '/pages/home/index'
				})
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
