<script>
	import {
		mapState,
		mapMutations
	} from 'vuex';
	export default {
		onLaunch: function() {
			console.log('App Launch')
			let role = uni.getStorageSync('role');
			this.setRole(role);
			console.log("app" , role);
			// if (role) {
				// uni.showLoading({
				// 	title:"自动登录中",
				// })
				// setTimeout(()=>{
				// 	uni.hideLoading();
					// uni.switchTab({
					// 	url:"/pages/index/index"
					// })
				// },2000)
			// }
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		methods: {
			...mapMutations(['setRole'])
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "uview-ui/index.scss";
	@import './assets/css/style.less';
	@import url("./static/colorui/animation.css");
</style>
