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.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/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/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" > +