From 4f9b508e229e7ae0e0faeeeb92529bdf533aa440 Mon Sep 17 00:00:00 2001 From: xianyi Date: Tue, 16 Dec 2025 17:35:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=AA=8C=E8=AF=81=E7=A0=81=EF=BC=88=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/his.ts | 14 ++++++++++++++ src/api/types.ts | 23 +++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/src/api/his.ts b/src/api/his.ts index 7bd3e7f..bc4371c 100644 --- a/src/api/his.ts +++ b/src/api/his.ts @@ -36,6 +36,8 @@ import type { VerificationCodeImageResponse, InputLoginByPassword, LoginByPasswordResponse, + InputVerificationCodePhone, + VerificationCodePhoneResponse, } from './types'; /** @@ -291,3 +293,15 @@ export const loginByPassword = ( ).then(res => res.data); }; +/** + * 获取登录验证码(手机号) + */ +export const getVerificationCodePhone = ( + data: InputVerificationCodePhone +): Promise => { + return request.post( + `/api/auth/verification-code/phone`, + data + ).then(res => res.data); +}; + diff --git a/src/api/types.ts b/src/api/types.ts index 7647b1d..2e9a512 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -588,3 +588,26 @@ export interface OutputLoginByPassword { */ export type LoginByPasswordResponse = CommonActionResult; +/** + * 获取登录验证码(手机号)入参 + */ +export interface InputVerificationCodePhone { + /** 应用ID */ + app_id: string; + /** 手机号 */ + phone: string; +} + +/** + * 获取登录验证码(手机号)出参 + */ +export interface OutputVerificationCodePhone { + /** 验证码标识键 */ + verification_code_key: string; +} + +/** + * 获取登录验证码(手机号)响应 + */ +export type VerificationCodePhoneResponse = CommonActionResult; +