From 58d3f2e890cd459dd6756cf9e403031d09d7a5d9 Mon Sep 17 00:00:00 2001 From: wangqiao Date: Tue, 14 Oct 2025 08:58:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E6=88=90=E5=8A=9F=E9=80=9A=E7=9F=A5=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/login/index.ts | 23 +++++++++++++++++------ pages/auth-success/index.vue | 31 +++++++------------------------ 2 files changed, 24 insertions(+), 30 deletions(-) diff --git a/api/login/index.ts b/api/login/index.ts index 76df818..b102fbd 100644 --- a/api/login/index.ts +++ b/api/login/index.ts @@ -28,13 +28,17 @@ export const loginByMobile = (params: { mobile: string; code: string; socialCode * 发送邮箱验证码 */ export const sendEmailCode = (data: { email: string }) => { - return useDollarFetchRequest.post>('/prod-api/app-api/member/auth/send-email-code?email=' + data.email, {},{ - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - 'Accept': 'application/json, text/plain, */*', - 'Access-Control-Allow-Origin-Type': '*', + return useDollarFetchRequest.post>( + '/prod-api/app-api/member/auth/send-email-code?email=' + data.email, + {}, + { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + Accept: 'application/json, text/plain, */*', + 'Access-Control-Allow-Origin-Type': '*', + }, } - }) + ) } /** @@ -50,3 +54,10 @@ export const loginByEmail = (params: { email: string; code: string }) => { export const resetPassword = (params: { password: string; code: string }) => { return useDollarFetchRequest.put>('/prod-api/app-api/member/user/update-password', params) } + +/** + * 授权成功通知后台 + */ +export const notifyAuthSuccess = (params: { code: string; state: string }) => { + return useDollarFetchRequest.get>('/prod-api/app-api/member/auth/wx-login-url', { query: params }) +} diff --git a/pages/auth-success/index.vue b/pages/auth-success/index.vue index 4fc833e..856802d 100644 --- a/pages/auth-success/index.vue +++ b/pages/auth-success/index.vue @@ -30,36 +30,19 @@