From 386f7e24fb132deacb829a86aeb723dd1d1172eb Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期二, 16 七月 2024 14:13:46 +0800 Subject: [PATCH] 修改密码调用接口 登录添加过期提醒 登录框中英文切换不显示bug --- Source/plt-web/plt-web-ui/src/store/modules/user.js | 9 ++++++--- 1 files changed, 6 insertions(+), 3 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 6f14ce8..9aef2f5 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 @@ -62,16 +62,19 @@ //鏍规嵁鐢ㄦ埛鍚嶇櫥褰� LoginByUsername({commit}, userInfo) { return new Promise((resolve, reject) => { - loginByUsername(userInfo.deptId, userInfo.roleId, userInfo.username, userInfo.password, userInfo.type, userInfo.key,).then(res => { + loginByUsername(userInfo.deptId, userInfo.roleId, userInfo.username,userInfo.password, 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); + commit('SET_TOKEN', data.obj.tokenVO.accessToken); commit('SET_REFRESH_TOKEN', data.obj.tokenVO.accessToken); commit('DEL_ALL_TAG'); commit('CLEAR_LOCK'); getUserInfo().then((res) => { - const data = res.data.data; + const data = res.data; commit('SET_USER_INFO', data.obj); }).catch(err => { console.log(err) @@ -83,7 +86,7 @@ type: 'error' }) } - resolve(); + resolve(data); }).catch(error => { reject(error); }) -- Gitblit v1.9.3