From e868d50893da5003839ffde83368a2c20f1b06ec Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Mon, 6 May 2024 15:43:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D=E7=A7=B0=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.js | 2 +- src/store/modules/user.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/permission.js b/src/permission.js index c1d1f2d5..db67208e 100644 --- a/src/permission.js +++ b/src/permission.js @@ -34,7 +34,7 @@ router.beforeEach(async(to, from, next) => { NProgress.done() } else { OSSclient() - const hasGetUserInfo = store.getters.name + const hasGetUserInfo = store.getters.userId if (hasGetUserInfo) { next() } else { diff --git a/src/store/modules/user.js b/src/store/modules/user.js index cb033368..4055495a 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -107,6 +107,7 @@ const actions = { zzSessionStorage.setItem('userName', data.BasicInfo.UserName) commit('SET_TOKEN', data.JWTStr) commit('SET_NAME', data.BasicInfo.RealName) + zzSessionStorage.setItem('realName', data.BasicInfo.RealName) zzSessionStorage.setItem('isTestUser', data.BasicInfo.IsTestUser) commit('SET_ISTESTUSER', data.BasicInfo.IsTestUser) commit('SET_USERNAME', data.BasicInfo.UserName) @@ -161,7 +162,7 @@ const actions = { commit('SET_PERMISSIONS', JSON.parse(zzSessionStorage.getItem('permissions'))) commit('SET_ISTESTUSER', zzSessionStorage.getItem('isTestUser')) const user = JSON.parse(userString) - commit('SET_NAME', user.realName) + commit('SET_NAME', zzSessionStorage.getItem('realName')) commit('SET_USERID', user.id) commit('SET_USERNAME', zzSessionStorage.getItem('userName')) commit('SET_NEED_SIGN_SYSTEM_DOC_COUNT', parseInt(zzSessionStorage.getItem('TotalNeedSignSystemDocCount')))