From a9e93d47379782fdda2a9f7e82c2043560693b0d Mon Sep 17 00:00:00 2001 From: xianyi Date: Tue, 16 Dec 2025 11:07:22 +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=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/his.ts | 15 +++++++++++++++ src/api/types.ts | 23 +++++++++++++++++++++++ 2 files changed, 38 insertions(+) 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; +