refactor(头像处理): 统一使用 $getHeadImgUrl 方法生成头像 URL

This commit is contained in:
yangzhe 2026-01-28 15:51:29 +08:00
parent c2f5443eaf
commit fc3bd33713
2 changed files with 3 additions and 7 deletions

View File

@ -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);
},
},

View File

@ -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: "",
},