diff --git a/components/ChatHistory.vue b/components/ChatHistory.vue index 865d7da..aac6ad8 100644 --- a/components/ChatHistory.vue +++ b/components/ChatHistory.vue @@ -197,11 +197,7 @@ export default { }, headSculptureUrl() { - if (this.vuex_user.HeadSculptureUrl) { - return this.baseUrl + "/" + this.vuex_user.HeadSculptureUrl; - } - - return "/static/common/images/avatar.png"; + return this.$getHeadImgUrl(this.vuex_user.HeadSculptureUrl); }, }, diff --git a/pages/home/userSetting/index.vue b/pages/home/userSetting/index.vue index 92b8fc1..9c807b9 100644 --- a/pages/home/userSetting/index.vue +++ b/pages/home/userSetting/index.vue @@ -242,7 +242,7 @@ export default { this.imageUrl = data.headSculptureUrl; this.imageValue = [ { - url: this.baseUrl + "/" + data.headSculptureUrl, + url: this.$getHeadImgUrl(data.headSculptureUrl), extname: "png", name: "", }, @@ -251,7 +251,7 @@ export default { this.imageUrl = ""; this.imageValue = [ { - url: "/static/common/images/avatar_default2.png", + url: this.$getHeadImgUrl(this.vuex_user.HeadSculptureUrl), extname: "jpg", name: "", },