From 28818df411a1f0fd77aea7b88760c7becdd1ded9 Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Fri, 1 Nov 2024 20:00:51 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/userInfo.js | 12 ++++-------- src/router/index.js | 16 ++++++++-------- src/views/index.vue | 14 ++++++-------- src/views/system/user/profile/resetPwd.vue | 9 ++++++++- 4 files changed, 26 insertions(+), 25 deletions(-) diff --git a/src/api/system/userInfo.js b/src/api/system/userInfo.js index aea3348..60a361d 100644 --- a/src/api/system/userInfo.js +++ b/src/api/system/userInfo.js @@ -47,15 +47,11 @@ export function resetPwd(data) { } // 用户密码修改 -export function updateUserPwd(oldPassword, newPassword) { - const data = { - oldPassword, - newPassword - } +export function updateUserPwd(data) { return request({ - url: '/system/user/profile/updatePwd', - method: 'put', - params: data + url: '/system/user/updatePwd', + method: 'post', + data: data }) } diff --git a/src/router/index.js b/src/router/index.js index b09eccf..72f1e3e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -65,14 +65,14 @@ export const constantRoutes = [ path: '', component: Layout, redirect: 'index', - // children: [ - // { - // path: 'index', - // component: () => import('@/views/dashboard'), - // name: 'Index', - // meta: { title: '首页', icon: 'dashboard', affix: true } - // } - // ] + children: [ + { + path: 'index', + component: () => import('@/views/index'), + name: 'Index', + meta: { title: '首页', icon: 'dashboard', affix: true } + } + ] }, { path: '/user', diff --git a/src/views/index.vue b/src/views/index.vue index f29b8a1..5ee8f42 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -2,13 +2,11 @@
-

博诺思后台管理框架

-

- 当前版本: v{{ version }} -

+

考勤后台管理系统

+
- +
- +
diff --git a/src/views/system/user/profile/resetPwd.vue b/src/views/system/user/profile/resetPwd.vue index cc16fe1..bead7ef 100644 --- a/src/views/system/user/profile/resetPwd.vue +++ b/src/views/system/user/profile/resetPwd.vue @@ -29,6 +29,7 @@ export default { } }; return { + userInfo:this.$store.state.user, user: { oldPassword: undefined, newPassword: undefined, @@ -55,7 +56,13 @@ export default { submit() { this.$refs["form"].validate(valid => { if (valid) { - updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => { + //this.user.oldPassword, this.user.newPassword + let param={ + userId:this.userInfo.id, + oldPassword:this.user.oldPassword, + password:this.user.newPassword + } + updateUserPwd(param).then(response => { this.$modal.msgSuccess("修改成功"); }); }