From f81e83fca9cfca4d5149450433d9650b9dd59197 Mon Sep 17 00:00:00 2001
From: feige <791364011@qq.com>
Date: 星期三, 21 八月 2024 17:14:00 +0800
Subject: [PATCH] 增加了新的模块

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

diff --git a/ruoyi-ui/src/store/modules/user.js b/ruoyi-ui/src/store/modules/user.js
index f6bd9ab..7428be4 100644
--- a/ruoyi-ui/src/store/modules/user.js
+++ b/ruoyi-ui/src/store/modules/user.js
@@ -6,6 +6,7 @@
     token: getToken(),
     name: '',
     avatar: '',
+	clanId: '',
     roles: [],
     permissions: []
   },
@@ -25,7 +26,10 @@
     },
     SET_PERMISSIONS: (state, permissions) => {
       state.permissions = permissions
-    }
+    },
+	SET_CLANID: (state, clanId) => {
+	  state.clanId = clanId
+	},
   },
 
   actions: {
@@ -63,9 +67,14 @@
           if (res.roles && res.roles.length > 0) { // 楠岃瘉杩斿洖鐨剅oles鏄惁鏄竴涓潪绌烘暟缁�
             commit('SET_ROLES', res.roles)
             commit('SET_PERMISSIONS', res.permissions)
+			
+		
           } else {
             commit('SET_ROLES', ['ROLE_DEFAULT'])
           }
+		 // console.log(res)
+		 // alert(res.user.clanId)
+		  	commit('SET_CLANID', res.user.clanId)
           commit('SET_NAME', user.userName)
           commit('SET_AVATAR', avatar)
           resolve(res)

--
Gitblit v1.9.1