From b6dbb57bdfdc47a092ea47a9aebea9f690c5d4a7 Mon Sep 17 00:00:00 2001 From: xianyi Date: Mon, 1 Dec 2025 13:50:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BD=BF=E7=94=A81201?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/hisApi.ts | 4 +--- src/pages/UI6/UI6.tsx | 2 +- src/pages/UI7/UI7.tsx | 7 +++---- src/pages/UI81/UI81.tsx | 10 +--------- 4 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/api/hisApi.ts b/src/api/hisApi.ts index 2466cee..3140a4c 100644 --- a/src/api/hisApi.ts +++ b/src/api/hisApi.ts @@ -64,7 +64,7 @@ export interface OptionalItemListResponse { export interface PackagItemInfo { patient_name: string; appointment_datetime: string; - package_code: number; + package_code: string; package_name: string; registration_time: string; } @@ -343,13 +343,11 @@ export function parsePdfUrlResponse( */ 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; diff --git a/src/pages/UI6/UI6.tsx b/src/pages/UI6/UI6.tsx index 3226d15..0cf3f0b 100644 --- a/src/pages/UI6/UI6.tsx +++ b/src/pages/UI6/UI6.tsx @@ -33,7 +33,7 @@ const UI6: React.FC = () => { } const res = await getPackagItemDetail(id_no as string); if (res.Status === 200) { - localStorage.setItem("package_code", res.Data.packagItemInfo.package_code.toString() || ""); + localStorage.setItem("package_code", res.Data.packagItemInfo.package_code || ""); // 处理数据:将 project_id 和 project_name 字符串分离为数组 const processedData = res.Data.listPackDetail.map((item: any) => { // 将 project_id 字符串按中文顿号分割为数组 diff --git a/src/pages/UI7/UI7.tsx b/src/pages/UI7/UI7.tsx index e87b9fc..f7dab8d 100644 --- a/src/pages/UI7/UI7.tsx +++ b/src/pages/UI7/UI7.tsx @@ -503,12 +503,11 @@ const UI7: React.FC = () => { const sign = async () => { const physical_exam_id = localStorage.getItem("selectedExamId"); - const package_code = localStorage.getItem("package_code"); - if (!physical_exam_id || !package_code) { - alert("体检ID或套餐代码不存在"); + if (!physical_exam_id) { + alert("体检ID不存在"); return; } - const res = await signIn(Number(physical_exam_id), Number(package_code)); + const res = await signIn(Number(physical_exam_id)); if (res.Status === 200) { if (res.Data.is_success === 0) { return; diff --git a/src/pages/UI81/UI81.tsx b/src/pages/UI81/UI81.tsx index 56f1e19..c310e92 100644 --- a/src/pages/UI81/UI81.tsx +++ b/src/pages/UI81/UI81.tsx @@ -1,26 +1,18 @@ -import React, { useEffect, useState } from "react"; +import React from "react"; import "./UI81.css"; import "../../assets/css/basic.css"; import { useNavigate } from "react-router-dom"; import ConfirmButton from "../../components/ConfirmButton"; import DecorLine from "../../components/DecorLine"; -import { getPackagItemDetail, signIn } from "../../api/hisApi"; import errorIcon from "../../assets/error.png"; const UI81: React.FC = () => { const navigate = useNavigate(); - const handleBack = () => { - navigate(-1); - }; - const handleConfirm = () => { navigate("/UI9"); }; - useEffect(() => { - }, []); - return (