From 8e7c69f6b441cd832a0daa5a351e3bace1b5a88f Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Fri, 25 Apr 2025 17:14:14 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E7=BB=9F=E4=B8=80=20api=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E9=A3=8E=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/api/core/auth.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/web-antd/src/api/core/auth.ts b/apps/web-antd/src/api/core/auth.ts index c71f5f598..ccb6da340 100644 --- a/apps/web-antd/src/api/core/auth.ts +++ b/apps/web-antd/src/api/core/auth.ts @@ -119,39 +119,39 @@ export async function checkCaptcha(data: any) { } /** 获取登录验证码 */ -export const sendSmsCode = (data: AuthApi.SmsCodeParams) => { +export async function sendSmsCode(data: AuthApi.SmsCodeParams) { return requestClient.post('/system/auth/send-sms-code', data); -}; +} /** 短信验证码登录 */ -export const smsLogin = (data: AuthApi.SmsLoginParams) => { +export async function smsLogin(data: AuthApi.SmsLoginParams) { return requestClient.post('/system/auth/sms-login', data); -}; +} /** 注册 */ -export const register = (data: AuthApi.RegisterParams) => { +export async function register(data: AuthApi.RegisterParams) { return requestClient.post('/system/auth/register', data); -}; +} /** 通过短信重置密码 */ -export const smsResetPassword = (data: AuthApi.ResetPasswordParams) => { +export async function smsResetPassword(data: AuthApi.ResetPasswordParams) { return requestClient.post('/system/auth/reset-password', data); -}; +} /** 社交授权的跳转 */ -export const socialAuthRedirect = (type: number, redirectUri: string) => { +export async function socialAuthRedirect(type: number, redirectUri: string) { return requestClient.get('/system/auth/social-auth-redirect', { params: { type, redirectUri, }, }); -}; +} /** 社交快捷登录 */ -export const socialLogin = (data: AuthApi.SocialLoginParams) => { +export async function socialLogin(data: AuthApi.SocialLoginParams) { return requestClient.post( '/system/auth/social-login', data, ); -}; +}