From 80b155851812db7f8b7d53d80a0c5f9dc329729c Mon Sep 17 00:00:00 2001 From: zhangyh Date: Mon, 27 Oct 2025 15:01:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=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/login.ts | 14 +++--- src/assets/css/style.less | 6 ++- src/utils/request.ts | 3 +- src/views/login/ResetPage.vue | 62 ++++++++++++++++++------- src/views/login/components/Mail.vue | 13 ++++++ src/views/login/components/Password.vue | 12 ++++- src/views/login/components/Verify.vue | 15 +----- 7 files changed, 86 insertions(+), 39 deletions(-) diff --git a/src/api/login.ts b/src/api/login.ts index 132fe7f..65abe4c 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -8,11 +8,12 @@ interface LoginParamsType { verifyCode?: string // 验证码 } -export const precheckAndSendEmail = (data: LoginParamsType): Promise => { +// 发送验证码 +export const precheckEmail = (params: { email: string }): Promise => { return request({ - url: '/api/auth/precheckAndSendEmail', - method: 'post', - data + url: '/api/auth/precheckEmail', + method: 'get', + params }) } @@ -35,6 +36,7 @@ export const resetPassword = (data: LoginParamsType): Promise => { export const checkLoginStatus = (): Promise> => { return request({ url: '/api/auth/checkLoginStatus', - method: 'get' + method: 'get', + meta: { responseAll: true } }) -} \ No newline at end of file +} diff --git a/src/assets/css/style.less b/src/assets/css/style.less index d4b0034..6524dc1 100644 --- a/src/assets/css/style.less +++ b/src/assets/css/style.less @@ -66,10 +66,14 @@ html:root { --van-notify-line-height: 10rem } - +.van-toast{ + min-height: fit-content; + max-width: none; +} .van-toast__text { font-size: 4rem; height: 5rem; line-height: 5rem; padding: 0 2rem; + min-height: fit-content; } \ No newline at end of file diff --git a/src/utils/request.ts b/src/utils/request.ts index b78decc..14eeee3 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -82,7 +82,8 @@ service.interceptors.response.use( message: res.errMsg || res.message, // type: 'fail', duration: 5000, - position:'top' + position:'top', + icon:'none' }) return Promise.reject(new Error('error')) diff --git a/src/views/login/ResetPage.vue b/src/views/login/ResetPage.vue index 3bd53af..8c418d1 100644 --- a/src/views/login/ResetPage.vue +++ b/src/views/login/ResetPage.vue @@ -16,14 +16,14 @@ @@ -35,37 +35,67 @@