From e96322043649fdc8fc02d886ac19cf8342a43248 Mon Sep 17 00:00:00 2001 From: yuxc <yuxc@vci-tech.com> Date: 星期一, 04 十一月 2024 11:37:13 +0800 Subject: [PATCH] 在登录时判断用户密码过期需要修改时,由于还未登录去获取当前Session的用户时,是null,所以导致报错,增加如果为空,直接使用界面传的用户。 --- Source/plt-web/plt-web-ui/src/store/modules/user.js | 12 ++---------- 1 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/store/modules/user.js b/Source/plt-web/plt-web-ui/src/store/modules/user.js index 99a59e2..d4a78eb 100644 --- a/Source/plt-web/plt-web-ui/src/store/modules/user.js +++ b/Source/plt-web/plt-web-ui/src/store/modules/user.js @@ -66,10 +66,7 @@ let passwordDes = func.encryptData(userInfo.password,'daliantan0v0vcip') loginByUsername(userInfo.deptId, userInfo.roleId, userInfo.username,passwordDes, userInfo.type, userInfo.key,).then(res => { const data = res.data; - if (data.code === 200) { - // commit('SET_TOKEN', data.obj.sessionInfo.token); - // commit('SET_REFRESH_TOKEN', data.obj.sessionInfo.token); - + if (data.obj.failCode === 'loginSuccess') { commit('SET_TOKEN', data.obj.tokenVO.accessToken); commit('SET_REFRESH_TOKEN', data.obj.tokenVO.accessToken); commit('DEL_ALL_TAG'); @@ -81,15 +78,10 @@ }).catch(err => { console.log(err) }) - - } else { - Message({ - message: data.msg, - type: 'error' - }) } resolve(data); }).catch(error => { + // console.log(error) reject(error); }) }) -- Gitblit v1.9.3