Commit 759280d8 authored by lijiongliang's avatar lijiongliang

个人中心修改

parent 703eca84
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<index v-if="tab=='index'"></index> <index v-if="tab=='index'"></index>
<moveCar v-if="tab=='moveCar'"></moveCar> <moveCar v-if="tab=='moveCar'"></moveCar>
<shop v-if="tab=='shop'"></shop> <shop v-if="tab=='shop'"></shop>
<personal v-if="tab=='personal'"></personal> <personal v-if="tab=='personal'" ref="personal"></personal>
<u-gap bgColor="transparent" height="055"></u-gap> <u-gap bgColor="transparent" height="055"></u-gap>
<view class="tabbar"> <view class="tabbar">
<v-tabbar ref="myTab" :list="tabbar" style="position:fixed;bottom:0;width:100%;left:0;right:0;" @tabChange="tabChange"></v-tabbar> <v-tabbar ref="myTab" :list="tabbar" style="position:fixed;bottom:0;width:100%;left:0;right:0;" @tabChange="tabChange"></v-tabbar>
...@@ -43,9 +43,11 @@ export default { ...@@ -43,9 +43,11 @@ export default {
}, },
onShow: function () { onShow: function () {
uni.hideHomeButton() uni.hideHomeButton()
if(this.tab == 'personal'){
this.$refs.personal.getUserInfo();
}
}, },
methods: { methods: {
tabChange(index) { tabChange(index) {
let that = this let that = this
switch (index) { switch (index) {
...@@ -130,7 +132,7 @@ export default { ...@@ -130,7 +132,7 @@ export default {
uni.navigateTo({ uni.navigateTo({
url: '/pagesB/pages/move-car/scan?moveCode=' + s url: '/pagesB/pages/move-car/scan?moveCode=' + s
}); });
}, }
}, },
onLoad(option) { onLoad(option) {
if(option && option.index){ if(option && option.index){
......
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
} }
], ],
//用户信息 //用户信息
userInfo: {nickName:'默认昵称'}, userInfo: null,
//头像 //头像
avatar: '', avatar: '',
} }
...@@ -295,13 +295,6 @@ export default { ...@@ -295,13 +295,6 @@ export default {
title: '个人中心' title: '个人中心'
}); });
}, },
onShow() {
this.getUserInfo()
// setTimeout(() => {
// this.show=true
// }, 100);
},
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment