import React, { useCallback, useEffect, useState } from "react"; import styles from "./index.module.scss"; import { Button, Modal } from "antd"; import { B1_APIgetInfo } from "@/store/action/B1orderz"; import { B1tableType } from "@/types"; type Props = { lookInfo: B1tableType; closeFu: () => void; }; type ListType = { name: string; num: number; phone: number; type: "身份证" | "社保卡"; }[]; function B1look({ lookInfo, closeFu }: Props) { const [list, setList] = useState([]); const getInfoFu = useCallback(async () => { const res = await B1_APIgetInfo(lookInfo.id); if (res.code === 0) { const resList = JSON.parse(res.data.rtf || "[]"); // console.log(123, resList); setList(resList); } }, [lookInfo.id]); useEffect(() => { getInfoFu(); }, [getInfoFu]); return (
申请时间:
{lookInfo.createTime}
验证状态:
{lookInfo.status ? "已验证" : "未验证"}
预约日期:
{lookInfo.bookDate}
预约时段:
{lookInfo.time}
预约人数:
{lookInfo.pcs}
{list.map((v, i) => (
参观人姓名:
{v.name}
参观人电话:
{v.phone}
{v.type}号:
{v.num}
))}
); } const MemoB1look = React.memo(B1look); export default MemoB1look;