<script>
	import {
		getToken
	} from './utils/auth.js'
	export default {
		onLaunch: function() {
			console.log('App Launch')
			const token = getToken()
			if (token) {
				// #ifdef APP-PLUS
				uni.reLaunch({
					url: "/pages/reportForm/index",
					success: () => {
						// #ifdef APP-PLUS
						plus.navigator.closeSplashscreen();
						// #endif
					}
				})
				// #endif
			} else {
				// uni.reLaunch({
				// 	url: "/pages/login/index",
				// 	success: () => {
				// 		// #ifdef APP-PLUS
				// 		plus.navigator.closeSplashscreen();
				// 		// #endif
				// 	}
				// })
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import '@/uni_modules/uview-ui/theme.scss';

	uni-button:after {
		border: none;
	}
</style>
