From 9a9be2ddb3edf4b45d8874901b42004256b8be85 Mon Sep 17 00:00:00 2001 From: Tcsm <1377977403@qq.com> Date: 星期一, 25 九月 2023 13:51:58 +0800 Subject: [PATCH] 9.25提交 --- ruoyi-ui/src/store/modules/user.js | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/store/modules/user.js b/ruoyi-ui/src/store/modules/user.js index ab0a6fe..2816332 100644 --- a/ruoyi-ui/src/store/modules/user.js +++ b/ruoyi-ui/src/store/modules/user.js @@ -31,16 +31,23 @@ actions: { // 鐧诲綍 Login({ commit }, userInfo) { + const username = userInfo.username.trim() const password = userInfo.password const code = userInfo.code + + const uuid = userInfo.uuid + return new Promise((resolve, reject) => { login(username, password, code, uuid).then(res => { - setToken(res.token) - commit('SET_TOKEN', res.token) + + setToken(res.data.token) + + commit('SET_TOKEN', res.data.token) resolve() }).catch(error => { + alert(error) reject(error) }) }) -- Gitblit v1.9.1