From a47397d8c778bd80684371dff9a944bb3e5ce483 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期二, 22 七月 2025 11:59:09 +0800 Subject: [PATCH] 1.头像未展示bug --- src/store/modules/user.js | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 89e9c2b..7c392fc 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -35,12 +35,9 @@ getInfo() { return new Promise((resolve, reject) => { getInfo().then(res => { - console.log('user',res) const user = res.user let avatar = user.avatar || "" - if (!isHttp(avatar)) { - avatar = (isEmpty(avatar)) ? defAva : import.meta.env.VITE_APP_BASE_API + avatar - } + avatar = import.meta.env.VITE_APP_BASE_API + '/profile/' + avatar if (res.roles && res.roles.length > 0) { // 楠岃瘉杩斿洖鐨剅oles鏄惁鏄竴涓潪绌烘暟缁� this.roles = res.roles this.permissions = res.permissions -- Gitblit v1.9.3