From a4db210c069cd45448067fffb39f070e9d119bb9 Mon Sep 17 00:00:00 2001
From: linwenling <3256558519@qq.com>
Date: 星期二, 26 九月 2023 17:00:32 +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