From 795c919e9e21d32dbd835c1a1f49f012232bf0cf Mon Sep 17 00:00:00 2001 From: xianyi Date: Fri, 28 Nov 2025 16:55:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/hisApi.ts | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/api/hisApi.ts b/src/api/hisApi.ts index fbfdb81..5ceb51f 100644 --- a/src/api/hisApi.ts +++ b/src/api/hisApi.ts @@ -83,8 +83,14 @@ export interface PackagItemDetailResponse { } // PDF响应 +export interface PdfItem { + pdf_name?: string | null; + pdf_url?: string | null; + combination_code?: number | null; +} + export interface PdfResponse { - list_pdf_url: string[]; + list_pdf_url: Array; message: string | null; } @@ -105,6 +111,11 @@ export interface ParsedPdfResponse { message: string; } +// 签到确认响应 +export interface SignInResponse { + is_success: number; // 0-成功 1-失败 +} + // 创建axios实例 function createAxiosInstance(baseURL: string): AxiosInstance { const instance = axios.create({ @@ -244,10 +255,12 @@ export async function getTongyishuPdfFile( */ export async function submitTongyishuSign( exam_id: number, + combination_code: number, sign_file: File | Blob ): Promise> { const formData = new FormData(); formData.append("exam_id", exam_id.toString()); + formData.append("combination_code", combination_code.toString()); formData.append("sign_file", sign_file); const response = await axiosInstance.post>( @@ -322,5 +335,24 @@ export function parsePdfUrlResponse( } } +/** + * 9. 体检客户签到确认 + * @param physical_exam_id 体检ID + * @param package_code 套餐代码 + */ +export async function signIn( + physical_exam_id: number, + package_code: number +): Promise> { + const response = await axiosInstance.post>( + "sign-in", + { + physical_exam_id, + package_code, + } + ); + return response.data; +} + // 导出axios实例,以便需要时进行自定义配置 export { axiosInstance };