From 2ad5d6ff28bd0497ae9cb06af0495517c85601ea Mon Sep 17 00:00:00 2001 From: baiying <15287105139@139.com> Date: Tue, 20 May 2025 16:52:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81)?= =?UTF-8?q?=EF=BC=9A=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81=E4=BC=A0=E5=8F=82?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/src/api/system/user.js | 9 +++------ vue/src/views/system/user/profile/resetPwd.vue | 6 +++++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/vue/src/api/system/user.js b/vue/src/api/system/user.js index 1043af5c..037bf7e5 100644 --- a/vue/src/api/system/user.js +++ b/vue/src/api/system/user.js @@ -102,15 +102,12 @@ export function updateUserProfile(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 + data: data }) } diff --git a/vue/src/views/system/user/profile/resetPwd.vue b/vue/src/views/system/user/profile/resetPwd.vue index 6c86c38f..7ba7ca3d 100644 --- a/vue/src/views/system/user/profile/resetPwd.vue +++ b/vue/src/views/system/user/profile/resetPwd.vue @@ -66,7 +66,11 @@ export default { submit() { this.$refs["form"].validate(valid => { if (valid) { - updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => { + const params = { + oldPassword: this.user.oldPassword, + newPassword: this.user.newPassword + } + updateUserPwd(params).then(response => { this.$modal.msgSuccess("修改成功,请重新登录!"); if (response.code == 200) { //清除登录缓存