Commit ee717ef8 authored by leiqingsong's avatar leiqingsong

修改设置界面的bug

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