添加获取登录验证码(手机号
This commit is contained in:
@@ -36,6 +36,8 @@ import type {
|
|||||||
VerificationCodeImageResponse,
|
VerificationCodeImageResponse,
|
||||||
InputLoginByPassword,
|
InputLoginByPassword,
|
||||||
LoginByPasswordResponse,
|
LoginByPasswordResponse,
|
||||||
|
InputVerificationCodePhone,
|
||||||
|
VerificationCodePhoneResponse,
|
||||||
} from './types';
|
} from './types';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -291,3 +293,15 @@ export const loginByPassword = (
|
|||||||
).then(res => res.data);
|
).then(res => res.data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取登录验证码(手机号)
|
||||||
|
*/
|
||||||
|
export const getVerificationCodePhone = (
|
||||||
|
data: InputVerificationCodePhone
|
||||||
|
): Promise<VerificationCodePhoneResponse> => {
|
||||||
|
return request.post<VerificationCodePhoneResponse>(
|
||||||
|
`/api/auth/verification-code/phone`,
|
||||||
|
data
|
||||||
|
).then(res => res.data);
|
||||||
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -588,3 +588,26 @@ export interface OutputLoginByPassword {
|
|||||||
*/
|
*/
|
||||||
export type LoginByPasswordResponse = CommonActionResult<OutputLoginByPassword>;
|
export type LoginByPasswordResponse = CommonActionResult<OutputLoginByPassword>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取登录验证码(手机号)入参
|
||||||
|
*/
|
||||||
|
export interface InputVerificationCodePhone {
|
||||||
|
/** 应用ID */
|
||||||
|
app_id: string;
|
||||||
|
/** 手机号 */
|
||||||
|
phone: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取登录验证码(手机号)出参
|
||||||
|
*/
|
||||||
|
export interface OutputVerificationCodePhone {
|
||||||
|
/** 验证码标识键 */
|
||||||
|
verification_code_key: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取登录验证码(手机号)响应
|
||||||
|
*/
|
||||||
|
export type VerificationCodePhoneResponse = CommonActionResult<OutputVerificationCodePhone>;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user