From c79dd89ef0c5a0e75c86136202e5c408c184a2f8 Mon Sep 17 00:00:00 2001
From: liudong <liudong>
Date: 星期六, 24 八月 2024 19:25:39 +0800
Subject: [PATCH] 新建会话修改
---
src/store/modules/user/index.ts | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/store/modules/user/index.ts b/src/store/modules/user/index.ts
index e7ae4eb..426abc7 100644
--- a/src/store/modules/user/index.ts
+++ b/src/store/modules/user/index.ts
@@ -75,8 +75,10 @@
avatar: res.data.avatar,
name: res.data.nickname,
email: res.data.email,
+ role: res.data.roles[0].roleKey,
};
- if(res.data.roles && res.data.roles.length>0)
+
+ if(res.data?.roles.length>0)
this.resources=res.data.roles[0].resources;
setUserInfo(JSON.stringify(userInfo));
setUserResources(JSON.stringify(this.resources))
--
Gitblit v1.8.0