From 432d47bd7fa2eac4f084f7f1dfdef452de760ae8 Mon Sep 17 00:00:00 2001
From: zhangxiao <898441624@qq.com>
Date: 星期一, 02 九月 2024 10:21:03 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/web/flow_web
---
src/store/modules/user/index.ts | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/store/modules/user/index.ts b/src/store/modules/user/index.ts
index 56d90b8..84388d7 100644
--- a/src/store/modules/user/index.ts
+++ b/src/store/modules/user/index.ts
@@ -81,11 +81,18 @@
this.name=res.data.userName
if(res.data?.roles.length>0)
- this.resources=res.data.roles[0].resources;
+ //閬嶅巻roles
+ for (const r of res.data.roles) {
+ if (!(this.resources)) {
+ this.resources = [];
+ }
+ this.resources = this.resources.concat(r.resources);
+ }
setUserInfo(JSON.stringify(userInfo));
setUserResources(JSON.stringify(this.resources))
for (const r of this.resources) {
if (r.menuType == 0) {
+
return r.component
}
}
--
Gitblit v1.8.0