From 61cfd79f90f7463ba1f9149d8d988bb081f6a3a1 Mon Sep 17 00:00:00 2001
From: feige <791364011@qq.com>
Date: 星期四, 29 八月 2024 12:30:19 +0800
Subject: [PATCH] Merge branch 'master' of http://47.93.189.255:8099/r/zhangshi_app_web
---
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