import React, { useCallback, useEffect, useState } from 'react' import styles from './index.module.scss' import { Button, Modal } from 'antd' import { B2_APIgetInfo } from '@/store/action/B2exhiLog' import { B2SonListType } from './type' type Props = { sId: number closeFu: () => void } function B2look({ sId, closeFu }: Props) { const [list, setList] = useState([]) const [info, setInfo] = useState({ createTime: '', bookDate: '', time: '', type: '', pcs: 0, teamDesc: '' }) const getInfoFu = useCallback(async (id: number) => { const res = await B2_APIgetInfo(id) if (res.code === 0) { setInfo(res.data) setList(JSON.parse(res.data.rtf)) } }, []) useEffect(() => { getInfoFu(sId) }, [getInfoFu, sId]) return (
预约类型:
{info.type === 'person' ? '个人预约' : '团队预约'}
申请时间:
{info.createTime}
预约日期:
{info.bookDate}
预约时段:
{info.time}
{list.map((item, index) => (
{info.type === 'person' ? '参观人' : '负责人'}姓名:
{item.name}
{info.type === 'person' ? '参观人' : '负责人'}电话:
{item.phone}
{item.papers || '证件号码'}:{item.identity}
))} {info.type === 'team' ? (
参团人数:
{info.pcs}
{info.teamDesc ? (
团队描述:
{info.teamDesc}
) : null}
) : null}
) } const MemoB2look = React.memo(B2look) export default MemoB2look