<template>
	<view>
		<!-- 头部信息 -->
		<m-info :user="user"></m-info>
		<!-- 基础功能 -->
		<m-icon></m-icon>
		<!-- m-list -->
		<m-list></m-list>
	</view>
</template>

<script>
	var _self;
	export default {
		data() {
			return {
				user:{},
				
			}
		},
		onLoad() {
			
			_self = this;
			// 获取用户信息
			this.get_user()
			
			
			// 调用全局封装的函数
			var loginRes = this.checkLogin(); 
			if(!loginRes){return false;}
			
			
			
		},
		methods:{
			get_user (){
				uni.getStorage({
				    key: 'user',
				    success: function (res) {
				        // console.log(res);
						_self.user = res.data
						// console.log(_self.user)
				    }
				});
				uni.getStorage({
				    key: 'Authorization',
				    success: function (res) {
				        console.log(res);
				    }
				});
			}
			
		}
		
	}
</script>

<style lang="scss">
	
</style>
