B2look.tsx 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. import React, { useCallback, useEffect } from 'react'
  2. import styles from './index.module.scss'
  3. import { Button, Modal } from 'antd'
  4. import { B2_APIgetInfo } from '@/store/action/B2exhiLog'
  5. type Props = {
  6. sId: number
  7. closeFu: () => void
  8. }
  9. const arr = [
  10. {
  11. id: 1,
  12. name: '啊萨达萨达是',
  13. phone: '18702025050',
  14. identity: '421083199504071212'
  15. },
  16. {
  17. id: 2,
  18. name: '王大锤',
  19. phone: '18702025050',
  20. identity: '421083199504071212'
  21. },
  22. {
  23. id: 3,
  24. name: '小溺😥',
  25. phone: '18702025050',
  26. identity: '421083199504071212'
  27. }
  28. ]
  29. function B2look({ sId, closeFu }: Props) {
  30. const getInfoFu = useCallback(async (id: number) => {
  31. const res = await B2_APIgetInfo(id)
  32. if (res.code === 0) {
  33. // 待完善 接口数据不明确
  34. console.log(123, res)
  35. }
  36. }, [])
  37. useEffect(() => {
  38. getInfoFu(sId)
  39. }, [getInfoFu, sId])
  40. return (
  41. <Modal
  42. wrapClassName={styles.B2look}
  43. open={true}
  44. title='查看'
  45. footer={
  46. [] // 设置footer为空,去掉 取消 确定默认按钮
  47. }
  48. >
  49. <div className='B2row'>
  50. <div className='B2box'>
  51. <div className='B2boxll'>申请时间:</div>
  52. <div className='B2boxrr'>2024-10-30 09:59:05</div>
  53. </div>
  54. {/* 待完善 */}
  55. {/* <div className='B2box'>验证状态:</div> */}
  56. <div className='B2box'>
  57. <div className='B2boxll'>预约日期:</div>
  58. <div className='B2boxrr'>2024-10-30</div>
  59. </div>
  60. <div className='B2box'>
  61. <div className='B2boxll'>预约时段:</div>
  62. <div className='B2boxrr'>08:00-09:00</div>
  63. </div>
  64. <br />
  65. </div>
  66. {arr.map(item => (
  67. <div className='B2row' key={item.id}>
  68. <div className='B2box'>
  69. <div className='B2boxll'>参观人姓名:</div>
  70. <div className='B2boxrr'>{item.name}</div>
  71. </div>
  72. <div className='B2box'>
  73. <div className='B2boxll'>参观人电话:</div>
  74. <div className='B2boxrr'>{item.phone}</div>
  75. </div>
  76. <div className='B2box'>
  77. <div className='B2boxll'>身份证号:</div>
  78. <div className='B2boxrr'>{item.identity}</div>
  79. </div>
  80. </div>
  81. ))}
  82. <div className='B2Lbtn'>
  83. <Button onClick={closeFu}>关闭</Button>
  84. </div>
  85. </Modal>
  86. )
  87. }
  88. const MemoB2look = React.memo(B2look)
  89. export default MemoB2look