From 71049a2149033ced0d498f2f9ed3d5d1b9ed644d Mon Sep 17 00:00:00 2001 From: ludc Date: 星期五, 19 七月 2024 16:12:34 +0800 Subject: [PATCH] 对象建模——枚举和枚举项的查询、新增、修改、删除、查看使用范围、下载导入模板、导入、导出接口并联调。 --- 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