import React, { PureComponent, useState, useEffect } from 'react'
import { Modal, Row, Col, Table, Pagination, Button, Form, Input,message } from 'antd'
import EnDash from '../EnDash'

import Style from './style.less'
import HotBlock from '../HotBlock'
import request from '../../../../../../utils/request';
import apis from '../../../../../../services/apis';

const UserInfo = props => {
  // const [data, setData] = useState({})
  const raiseRecord = props.raiseRecordId
  const raiseId = props.raiseId

  // useEffect(() => {
  //   console.log('userInfoLog', raiseId)
  //   getList({ pageNum: 1, pageSize: 10 });
  // }, [raiseRecordId])

  // function getList(params) {
  //   // 网路请求
  //   request({ ...apis.house.getUserInfo, params: { raiseRecordId:raiseRecordId} }).then(res => {
  //     console.log(res,'adminData')
  //     setData(res)
  //   }).catch(err => {
  //     message.info("出错了")
  //   })
  // }

  function refreshList(e){
    console.log('.....',e)
    props.onCancel(e)
  }

  return (
    <Modal footer={null} title="个人信息" visible={props.visible} onCancel={() => refreshList({visable:false, raiseRecord:raiseRecord})} width={800}>
      <div className={Style.cardBox}>
        <div className={Style.rightBox}>
          <div className={Style.flexBox}>
            <img className={Style.touxiang} src={raiseRecord.avatarurl} />
            <div className={Style.right}>
              <p className={Style.rightItem}>昵称：{raiseRecord.nickname}</p>
              <p className={Style.rightItem}>姓名：{raiseRecord.name}</p>
              <p className={Style.rightItem}>用户手机号：{raiseRecord.tel}</p>
              <p className={Style.rightItem} style={{width:'400px'}}>身份证号：{raiseRecord.idcard}</p>
              <p className={Style.rightItem}>认筹手机号：{raiseRecord.tel}</p> 
            </div>
          </div>
        </div>
      </div>
    </Modal>
  );
}

const WrappedBase = Form.create({ name: 'UserInfo' })(UserInfo);

export default WrappedBase

