Commit ee717ef8 authored by leiqingsong's avatar leiqingsong

修改设置界面的bug

parent 6ee28648
......@@ -3,7 +3,7 @@
<van-cell-group class="group-1">
<van-cell title="用户名" :value="userName" />
<van-cell is-link center title="头像" @click="onModefy">
<img class="avatar-img" :src="imgBaseUrl + avatar" alt="头像" />
<img class="avatar-img" :src="avatar" alt="头像" />
</van-cell>
</van-cell-group>
<van-cell-group>
......@@ -56,7 +56,7 @@ export default {
data() {
return {
userName: "",
imgBaseUrl: "",
headImage: "",
avatar: "",
fileList: [],
fillCode: "",
......@@ -65,7 +65,6 @@ export default {
};
},
created() {
this.imgBaseUrl = process.env.VUE_APP_BASE_URL;
this.getUser();
},
methods: {
......@@ -81,11 +80,11 @@ export default {
this.userName = res.userId;
this.inviteeCode =
res.beInvitedCode == 1 ? "请填写推荐人邀请码" : res.beInvitedCode;
this.avatar = res.headImage;
this.headImage = res.headImage;
this.avatar = process.env.VUE_APP_BASE_URL + res.headImage;
});
}
}).catch(err => {
console.log(err.response);
if (err.response.status === 502) {
this.$toast('服务在升级,请稍后重试')
}
......@@ -110,7 +109,7 @@ export default {
this.$router.push({
path: "/modefy-avatar",
query: {
headImage: this.avatar
headImage: this.headImage
}
});
},
......
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