<template>
  <view class="my-container">
    <my-login v-if="!token"></my-login>
    
    <my-userinfo v-else></my-userinfo>
	<m-tabbar native=""></m-tabbar>
  </view>
</template>

<script>
  import {mapState} from "vuex"
  import {
  	mapMutations
  } from 'vuex'
  export default {
    data() {
      return {
        
      };
    },
	onLoad(){
		this.updatetoken(uni.getStorageSync('token'))
	},
	methods:{
		...mapMutations('m_user', ['updateUserInfo', 'updatetoken','savetokentostorage'])
	},
    computed: {
      ...mapState('m_user',['token'])
    }
  }
</script>

<style lang="scss">
page,
.my-container {
  height: 100%;
}
</style>
