<script>
	import {
		mapMutations
	} from 'vuex';
	export default {
		onLaunch: function() {
			console.log('App Launch')
			let userInfo = uni.getStorageSync('userInfo') || ''
			if (userInfo) {
				uni.getStorage({
					key: 'userInfo',
					success(res) {
						this.login(res.data)
					}
				})
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		methods: {
			...mapMutations(['login']),

		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "uview-ui/index.scss";

	page {
		font-size: 28rpx;
		background: #DDDDDD;
	}
</style>
