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')))