
<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			let token = sessionStorage.getItem('token');
			token = typeof(token) != 'undefined' && token != null? token : ''
			// this.$store.commit('setToken',{access_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJqd3RfeWgiLCJleHAiOjE2MjY5NDg2NjgsInN1YiI6IllIIiwiYXVkIjoiZXZlcnkiLCJuYmYiOjE2MjY2ODk0NjgsImlhdCI6MTYyNjY4OTQ2OCwianRpIjoxMDAwMSwidWlkIjo1OH0.oVZQvUKD5I1KT0V7TZ5t9gJyw5DQeyndQuf0p7H2dmw'})
			if((token=='') && this.$router.history.current.path != '/pages/entry/auth' && this.$router.history.current.path != '/pages/pay/success'){
				uni.navigateTo({
					url: '/pages/entry/auth?reback_url='+location.href
				})
			}else if(this.$store.state.token){
				uni.setTabBarItem({
					index: 4,
					text: '我的'
				})
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
	}
</script>

<!-- <style>
	/*每个页面公共css */
</style> -->
<style lang="scss">
	/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
	
	.uni-forms_check uni-checkbox .uni-checkbox-input {
		border-radius: 100%;
		width: 32rpx;
		height: 32rpx;
		border-color: #ab820d;
	}
	.uni-forms_check uni-checkbox .uni-checkbox-input-checked:before {
		color: #ab820d;
	}
	.uni-forms_check uni-checkbox .uni-checkbox-input-checked {
		color: #ab820d;
	}
	.uni-forms_check uni-checkbox:not([disabled]) .uni-checkbox-input:hover {
		border-color: #ab820d;
		color: #ab820d !important;
	}
	@import "uview-ui/index.scss";
</style>
