From 3b38a0d6287c35e43c67fbd4d886967b8d5fbb2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com>
Date: Thu, 19 May 2022 23:29:37 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E5=AE=8C=E5=96=84=E7=95=8C=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/AccountController.cs | 4 ++++
Yi.Vue2.x/src/views/AdmRoleMenu.vue | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/AccountController.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/AccountController.cs
index 9e1937df..eedda300 100644
--- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/AccountController.cs
+++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/AccountController.cs
@@ -70,6 +70,10 @@ namespace Yi.Framework.ApiMicroservice.Controllers
return Result.SuccessError("注册失败!用户名已存在!");
}
+ ///
+ /// 没啥说,登出
+ ///
+ ///
[HttpPost]
public Result Logout()
{
diff --git a/Yi.Vue2.x/src/views/AdmRoleMenu.vue b/Yi.Vue2.x/src/views/AdmRoleMenu.vue
index 837abca6..e8e5ae6f 100644
--- a/Yi.Vue2.x/src/views/AdmRoleMenu.vue
+++ b/Yi.Vue2.x/src/views/AdmRoleMenu.vue
@@ -47,6 +47,11 @@
hoverable
item-text="menuName"
>
+
+
+ {{ item.menuIcon }}
+
+
路由:{{ item.router }}
权限:{{ item.permissionCode }}
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 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=89=8D?=
=?UTF-8?q?=E7=AB=AF=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E6=9B=B4=E6=96=B0?=
=?UTF-8?q?=E5=AD=98=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() {