From e14a078440f79f1637a073ae0170a23b2eb467c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com>
Date: Sun, 22 May 2022 20:58:17 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=89=8D=E7=AB=AF?=
=?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E6=9B=B4=E6=96=B0=E5=AD=98?=
=?UTF-8?q?=E5=82=A8=E7=9A=84bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Config/SwaggerDoc.xml | 6 ++++++
Yi.Vue2.x/src/store/modules/user.js | 11 ++++++++++-
Yi.Vue2.x/src/views/userInfo.vue | 2 +-
3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml
index 8b75f66e..bc6619da 100644
--- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml
+++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml
@@ -23,6 +23,12 @@
+
+
+ 没啥说,登出
+
+
+
通过已登录的用户获取用户信息及菜单
diff --git a/Yi.Vue2.x/src/store/modules/user.js b/Yi.Vue2.x/src/store/modules/user.js
index fc1b4a3c..587919e7 100644
--- a/Yi.Vue2.x/src/store/modules/user.js
+++ b/Yi.Vue2.x/src/store/modules/user.js
@@ -40,6 +40,11 @@ const mutations = { //变化//载荷
state.user = user
setUser(user)
},
+ SET_NEW_USER(state, userInfo) {
+ state.user.user = userInfo
+ setUser(state.user)
+ },
+
SetGradient(state, gradient) {
state.drawer.gradient = gradient
},
@@ -90,7 +95,11 @@ const actions = { //动作
var code=[];
resp2.data.menus.forEach(element => {
- code.push(element.permissionCode)
+ if(element.permissionCode!="")
+ {
+ code.push(element.permissionCode)
+ }
+
});
commit('SET_PER', code)
diff --git a/Yi.Vue2.x/src/views/userInfo.vue b/Yi.Vue2.x/src/views/userInfo.vue
index de576c82..a23ebb04 100644
--- a/Yi.Vue2.x/src/views/userInfo.vue
+++ b/Yi.Vue2.x/src/views/userInfo.vue
@@ -335,7 +335,7 @@ export default {
this.editInfo = Object.assign({}, this.userInfo);
this.roleInfo = resp.data.roles;
this.menuInfo = resp.data.menus;
- this.$store.commit("SET_USER", this.userInfo);
+ this.$store.commit("SET_NEW_USER", this.userInfo);
});
},
choiceImg() {