更新使用1201接口
This commit is contained in:
@@ -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<ApiResponse<SignInResponse>> {
|
||||
const response = await axiosInstance.post<ApiResponse<SignInResponse>>(
|
||||
"sign-in",
|
||||
{
|
||||
physical_exam_id,
|
||||
package_code,
|
||||
}
|
||||
);
|
||||
return response.data;
|
||||
|
||||
@@ -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 字符串按中文顿号分割为数组
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 (
|
||||
<div className="basic-root">
|
||||
<div className="basic-white-block">
|
||||
|
||||
Reference in New Issue
Block a user