From 6941b869c7e60c4584a49b76778e430973fc6ee4 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 17 Dec 2023 18:57:08 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E4=BF=AE=E6=94=B9=E5=AF=86?= =?UTF-8?q?=E7=A0=81=EF=BC=9A=E6=8E=A5=E5=85=A5=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sheep/api/member/user.js | 13 +++ sheep/api/user.js | 24 ---- .../components/change-password.vue | 105 ++++++++---------- .../components/reset-password.vue | 2 +- sheep/hooks/useModal.js | 9 +- sheep/store/modal.js | 3 +- 6 files changed, 68 insertions(+), 88 deletions(-) diff --git a/sheep/api/member/user.js b/sheep/api/member/user.js index f0aba4c..38ed110 100644 --- a/sheep/api/member/user.js +++ b/sheep/api/member/user.js @@ -1,6 +1,19 @@ import request from '@/sheep/request2'; const UserApi = { + // 修改密码 + updateUserPassword: (data) => { + return request({ + url: '/app-api/member/user/update-password', + method: 'PUT', + data, + custom: { + loadingMsg: '验证中', + showSuccess: true, + successMsg: '修改成功' + }, + }); + }, // 重置密码 resetUserPassword: (data) => { return request({ diff --git a/sheep/api/user.js b/sheep/api/user.js index ee153b7..6021a10 100644 --- a/sheep/api/user.js +++ b/sheep/api/user.js @@ -93,18 +93,6 @@ export default { }, }), - // 修改密码 - changePassword: (data) => - request({ - url: '/user/api/user/changePassword', - method: 'POST', - data, - custom: { - showSuccess: true, - loadingMsg: '验证中', - }, - }), - // 绑定、更换手机号 changeMobile: (data) => request({ @@ -117,18 +105,6 @@ export default { }, }), - // 修改用户名 - changeUsername: (data) => - request({ - url: '/user/api/user/changeUsername', - method: 'POST', - data, - custom: { - showSuccess: true, - loadingMsg: '验证中', - }, - }), - // 更新小程序信息 updateMpUserInfo: (data) => request({ diff --git a/sheep/components/s-auth-modal/components/change-password.vue b/sheep/components/s-auth-modal/components/change-password.vue index 0e0af5c..b02ea02 100644 --- a/sheep/components/s-auth-modal/components/change-password.vue +++ b/sheep/components/s-auth-modal/components/change-password.vue @@ -1,4 +1,4 @@ - +