From 2ad73cd69ac29dcd580c9fe3179b9b7ded5d567f Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 6 Jul 2022 09:12:43 +0800 Subject: [PATCH] =?UTF-8?q?v3.8.2=20=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E7=94=A8=E6=88=B7=E8=A1=A8=20=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E5=88=97=E4=B8=BA=20null=20=E6=97=B6=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=BB=98=E8=AE=A4=E5=A4=B4=E5=83=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-admin/src/store/modules/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-ui-admin/src/store/modules/user.js b/yudao-ui-admin/src/store/modules/user.js index 10deeeebc..5b0b74994 100644 --- a/yudao-ui-admin/src/store/modules/user.js +++ b/yudao-ui-admin/src/store/modules/user.js @@ -107,7 +107,7 @@ const user = { res = res.data; // 读取 data 数据 const user = res.user - const avatar = user.avatar === "" ? require("@/assets/images/profile.jpg") : user.avatar; + const avatar = ( user.avatar === "" || user.avatar == null ) ? require("@/assets/images/profile.jpg") : user.avatar; if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 commit('SET_ROLES', res.roles) commit('SET_PERMISSIONS', res.permissions)