detail.jsx 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import { getBrokerDetails } from '@/services/apis';
  2. import { useEffect } from 'react';
  3. import React from 'react';
  4. import { Avatar, Row, Col } from 'antd';
  5. import apis from '@/services/apis';
  6. import request from '@/utils/request';
  7. function agentDeal (props) {
  8. const { detail, personId } = props;
  9. // const formRef = useRef();
  10. // useEffect(() => {
  11. // if (personId) {
  12. // getBrokerDetails(personId).then((res) => {
  13. // res; console.log('方方', res)
  14. // });
  15. // }
  16. // }, [personId]);
  17. useEffect(() => {
  18. request({
  19. ...apis.broker.getBrokerDetails, params: { personId: detail.personId }
  20. }).then((res) => {
  21. res; console.log('res', res)
  22. });
  23. });
  24. const list = [
  25. {
  26. title: '姓名',
  27. render: detail.name,
  28. },
  29. {
  30. title: '手机号',
  31. render: detail.phone,
  32. },
  33. {
  34. title: '身份证号',
  35. render: detail.idNo,
  36. },
  37. {
  38. title: '银行卡号',
  39. // render: detail.personId,
  40. },
  41. ];
  42. return (
  43. <>
  44. <Row>
  45. {list.map((x, index) => {
  46. return (
  47. <div key={index} style={{ marginBottom: '20px', display: 'flex' }}>
  48. <Col span={7}>{x.title}:</Col>
  49. <Col span={17}>{x.render || '--'}</Col>
  50. </div>
  51. );
  52. })}
  53. </Row>
  54. </>
  55. );
  56. }
  57. export default agentDeal;