From 446b2b02f1e2cbd1eedf845927f1d043626ab876 Mon Sep 17 00:00:00 2001 From: zhangxiao <898441624@qq.com> Date: 星期四, 29 八月 2024 21:12:14 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/web/flow_web --- src/store/modules/user/index.ts | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/store/modules/user/index.ts b/src/store/modules/user/index.ts index 047dcc1..84388d7 100644 --- a/src/store/modules/user/index.ts +++ b/src/store/modules/user/index.ts @@ -81,7 +81,13 @@ 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) { -- Gitblit v1.8.0