From da3bcff4dc2c242ce14166200bc9dd865e53f491 Mon Sep 17 00:00:00 2001
From: linwenling <3256558519@qq.com>
Date: 星期二, 18 七月 2023 16:46:31 +0800
Subject: [PATCH] 修改家庭模块的内容

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