From 368a9044be6f9416ace216cf121130dd05127522 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 17 Mar 2022 09:48:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DOracle=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E7=94=A8=E6=88=B7=E8=A1=A8=E5=A4=B4=E5=83=8F=E5=88=97?= =?UTF-8?q?=E4=B8=BAnull=E6=97=B6=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=BB=98?= =?UTF-8?q?=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 --- ruoyi-ui/src/store/modules/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-ui/src/store/modules/user.js b/ruoyi-ui/src/store/modules/user.js index 103706d..262de9b 100644 --- a/ruoyi-ui/src/store/modules/user.js +++ b/ruoyi-ui/src/store/modules/user.js @@ -57,7 +57,7 @@ const user = { return new Promise((resolve, reject) => { getInfo().then(res => { 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)