From f468170d79dee3f8efb75705c7e23a1b53e54e91 Mon Sep 17 00:00:00 2001
From: feige <791364011@qq.com>
Date: 星期二, 29 七月 2025 22:08:02 +0800
Subject: [PATCH] 修改了内容

---
 ruoyi-ui/src/store/modules/user.js |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ruoyi-ui/src/store/modules/user.js b/ruoyi-ui/src/store/modules/user.js
index 045498d..ad92ec3 100644
--- a/ruoyi-ui/src/store/modules/user.js
+++ b/ruoyi-ui/src/store/modules/user.js
@@ -7,6 +7,7 @@
     name: '',
     avatar: '',
 	clanId: '',
+	userId: '',
     roles: [],
     permissions: []
   },
@@ -18,6 +19,9 @@
     SET_NAME: (state, name) => {
       state.name = name
     },
+	SET_USERNAME: (state, uname) => {
+	  state.userName = uname
+	},
     SET_AVATAR: (state, avatar) => {
       state.avatar = avatar
     },
@@ -29,6 +33,9 @@
     },
 	SET_CLANID: (state, clanId) => {
 	  state.clanId = clanId
+	},
+	SET_USERID: (state, userId) => {
+	  state.userId = userId
 	},
   },
 
@@ -74,8 +81,10 @@
           }
 		 // console.log(res)
 		 // alert(res.user.clanId)
+		  commit('SET_USERID', res.user.userId)
 		  	commit('SET_CLANID', res.user.clanId)
           commit('SET_NAME', user.userName)
+		  commit('SET_USERNAME', user.nickName)
           commit('SET_AVATAR', avatar)
           resolve(res)
         }).catch(error => {

--
Gitblit v1.9.1