<template>
  <div class="NavBar">
		  <van-tabbar  v-model="active" @change="onChange">
		    <van-tabbar-item icon="wap-home">首页</van-tabbar-item>
		    <van-tabbar-item icon="comment">工作台</van-tabbar-item>
		    <van-tabbar-item icon="manager">个人中心</van-tabbar-item>
		  </van-tabbar>
  </div>
</template>

<script>
export default {
    data() {
        return {
            imgUrl:'',
			active: 0,
        }
    },
    methods:{
        async NavInit() {
            if(localStorage.getItem('token')){
            const res = await this.$http.get('/user/' + localStorage.getItem('id'))
            this.imgUrl = res.data[0].user_img
            }
        },
		onChange(index){
			
		}
    },
    mounted() {
        this.NavInit()
    }
}
</script>

<style scoped lang="less">
.NavBar{

}
</style>