diff --git a/src/api/his.ts b/src/api/his.ts index b24677f..ccf7724 100644 --- a/src/api/his.ts +++ b/src/api/his.ts @@ -32,6 +32,8 @@ import type { OperatorRemarkInfoResponse, InputOperatorRemarkInfoAdd, OperatorRemarkInfoAddResponse, + InputVerificationCodeImage, + VerificationCodeImageResponse, } from './types'; /** @@ -262,3 +264,16 @@ export const saveOperatorRemarkInfo = ( ).then(res => res.data); }; +/** + * 获取登录验证码(图片) + */ +export const getVerificationCodeImage = ( + data: InputVerificationCodeImage +): Promise => { + // 注意:此接口基础路径与其他 HIS 接口不同,直接使用 /api/auth + return request.post( + `/api/auth/verification-code/image`, + data + ).then(res => res.data); +}; + diff --git a/src/api/types.ts b/src/api/types.ts index cded0c6..738cc41 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -530,3 +530,26 @@ export interface OutputOperatorRemarkInfoAdd { */ export type OperatorRemarkInfoAddResponse = CommonActionResult; +/** + * 获取登录验证码(图片)入参 + */ +export interface InputVerificationCodeImage { + /** 应用ID */ + app_id: string; +} + +/** + * 获取登录验证码(图片)出参 + */ +export interface OutputVerificationCodeImage { + /** 验证码标识键 */ + verification_code_key: string; + /** 验证码图片(Base64 或图片地址) */ + verification_code_image: string; +} + +/** + * 获取登录验证码(图片)响应 + */ +export type VerificationCodeImageResponse = CommonActionResult; +