From 1bf37a25907f1127519e8131135e05f5a45276fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com> Date: Wed, 20 Oct 2021 16:38:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/MenuController.cs | 3 +- .../Controllers/UserController.cs | 1 + .../SwaggerDoc.xml | 7 + .../Yi.Framework.ApiMicroservice/YIDB.db-shm | Bin 32768 -> 0 bytes .../Yi.Framework.ApiMicroservice/YIDB.db-wal | 0 Yi.Vue/src/api/accountApi.js | 7 + Yi.Vue/src/api/menuApi.js | 6 + Yi.Vue/src/api/userApi.js | 6 + Yi.Vue/src/util/myaxios.js | 23 +- Yi.Vue/src/views/AdmUser.vue | 4 + Yi.Vue/src/views/userInfo.vue | 355 ++++++++++-------- 11 files changed, 244 insertions(+), 168 deletions(-) delete mode 100644 Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db-shm delete mode 100644 Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db-wal diff --git a/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/MenuController.cs b/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/MenuController.cs index babd9cfc..c846a8cf 100644 --- a/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/MenuController.cs +++ b/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/MenuController.cs @@ -104,8 +104,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers [HttpPost] public async Task AddChildrenMenu(ChildrenDto childrenDto) { - - var _children= await _menuService.AddChildrenMenu(childrenDto.parentId, childrenDto.data); + await _menuService.AddChildrenMenu(childrenDto.parentId, childrenDto.data); return Result.Success(); } /// diff --git a/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/UserController.cs b/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/UserController.cs index da355365..b6964d14 100644 --- a/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/UserController.cs +++ b/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/UserController.cs @@ -122,6 +122,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers /// 根据http上下文的用户得到该用户信息,关联角色 /// /// + [Authorize] [HttpGet] public async Task GetUserInfoById() { diff --git a/Yi.Framework/Yi.Framework.ApiMicroservice/SwaggerDoc.xml b/Yi.Framework/Yi.Framework.ApiMicroservice/SwaggerDoc.xml index 33289157..cad3e2be 100644 --- a/Yi.Framework/Yi.Framework.ApiMicroservice/SwaggerDoc.xml +++ b/Yi.Framework/Yi.Framework.ApiMicroservice/SwaggerDoc.xml @@ -32,6 +32,13 @@ + + + 修改密码 + + + + 更 diff --git a/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db-shm b/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db-shm deleted file mode 100644 index fe9ac2845eca6fe6da8a63cd096d9cf9e24ece10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32768 zcmeIuAr62r3是否重新进行登录?`, + title: '错误', + actions: { + 'false': '取消', + 'true': '跳转' + } + }); + if (res) { + vm.$store.dispatch("Logout").then((resp) => { + vm.$router.push({ path: "/login" }); + }); + } + + } else if (resp.code !== 200) { + vm.$dialog.notify.error(`错误代码:${resp.code},原因:${resp.msg}`, { + position: "top-right", + timeout: 5000, + }); } store.dispatch("closeLoad"); diff --git a/Yi.Vue/src/views/AdmUser.vue b/Yi.Vue/src/views/AdmUser.vue index fe42156d..89f1cf25 100644 --- a/Yi.Vue/src/views/AdmUser.vue +++ b/Yi.Vue/src/views/AdmUser.vue @@ -108,6 +108,8 @@ strInfo+="
" { text: "邮箱", value: "email", sortable: true }, { text: "IP", value: "ip", sortable: false }, { text: "年龄", value: "age", sortable: false }, + { text: "地址", value: "address", sortable: false }, + { text: "电话", value: "phone", sortable: false }, { text: "操作", value: "actions", sortable: false }, ], defaultItem: { @@ -116,6 +118,8 @@ strInfo+="
" icon: "mdi-lock", nick: "橙子", age: 18, + address:"中国", + phone:"" }, }), }; diff --git a/Yi.Vue/src/views/userInfo.vue b/Yi.Vue/src/views/userInfo.vue index 031c9563..a63a4f83 100644 --- a/Yi.Vue/src/views/userInfo.vue +++ b/Yi.Vue/src/views/userInfo.vue @@ -10,11 +10,13 @@ /> -
橙子
+
+ {{ userInfo.username }} +
-

橙子大大

+

{{ userInfo.nick }}

-

我认为世界有我而更精彩!难道不是吗?

+

{{ userInfo.introduction }}

编辑头像 @@ -31,7 +33,7 @@ - + 账户信息 mdi-phone @@ -51,192 +53,179 @@ - -
Account Information
- - - - - - - - - - + +
Account Information
+ + + + + + + + + + - - - - - - - - - - - - -
+ + + + + + + + + +
+
- - - -
Extra Information
- - - - - - mdi-phone - + + +
Extra Information
+ + + + + + mdi-phone + - - 等级: - 100 - + + 等级: + 100 + - - mdi-message-text - - + + mdi-message-text + +
- - + + - - 经验: - 1000 - + + 经验: + 1000 + - - mdi-message-text - - + + mdi-message-text + + - + - - - mdi-lock - + + + mdi-lock + - - 拥有角色: - - - 管理员 - - - - - - + + 拥有角色: + + + {{item.role_name}} + + + + + + - - 拥有接口: - - - 增删改查 - - - - + + 拥有菜单: + + + {{menuInfo.menu_name}} + + + + - + - - - mdi-email - + + + mdi-email + - - 发帖总数: - 1000 - - - - - - - - 评论总数: - 500 - - - - - - - - 查看主题 - - - - -
-
- -
-
-
+ + 等待更新: + 1000 + + + + + + 等待更新: + 500 + + + + + + + 等待更新 + + + + + + + +
+ -
Password Information
- - - - -
+
Password Information
+ + + + +
-
+ - - - - - - 清空 - - 保存 - + + 清空 + 保存 + @@ -245,10 +234,48 @@