From ffaf043738759196a0786dc6702ff82885989cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E6=B2=AB=E8=8A=B1=E7=81=ABzzz=F0=9F=8C=99?= Date: Fri, 18 Oct 2024 17:11:01 +0800 Subject: [PATCH] =?UTF-8?q?[*]=20=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/v2/user/password.api.ts | 4 ++-- src/components/UserInfo.vue | 2 +- src/views/auth/ResetPasswordView.vue | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/v2/user/password.api.ts b/src/api/v2/user/password.api.ts index 6f3bcdd..177f375 100644 --- a/src/api/v2/user/password.api.ts +++ b/src/api/v2/user/password.api.ts @@ -4,9 +4,9 @@ import { post } from '@/utils/request' const password = async ( username: string, - old_password: string | null, + old_password: string | undefined, new_password: string, - verify_code: string | null + verify_code: string | undefined ) => { const rs = await post(`${base.api_v2_url}/user/password`, { username: username, diff --git a/src/components/UserInfo.vue b/src/components/UserInfo.vue index 6f9e472..ed7c392 100644 --- a/src/components/UserInfo.vue +++ b/src/components/UserInfo.vue @@ -312,7 +312,7 @@ async function changePassword() { } let rs try { - rs = await api.v2.user.password(data.username, data.oldPassword, data.newPassword, null) + rs = await api.v2.user.password(data.username, data.oldPassword, data.newPassword, undefined) } catch (e) { logger.error(e) tPassword.value.isLoading = false diff --git a/src/views/auth/ResetPasswordView.vue b/src/views/auth/ResetPasswordView.vue index b97de02..ea33640 100644 --- a/src/views/auth/ResetPasswordView.vue +++ b/src/views/auth/ResetPasswordView.vue @@ -153,7 +153,7 @@ async function doResetRequest() { try { rs = await api.v2.user.password( model.value.username, - null, + undefined, model.value.password, model.value.verifyCode )