// 注意事项详情
import React from 'react';
import { $http } from "containers/config/https";
// import { List } from 'antd-mobile';
import './style/visitRecords.less';

// const Item = List.Item;

export default class PrecautionsDetails extends React.Component {
    constructor({history}) {
        super();
        let userData = localStorage.getItem("userData") ? JSON.parse(localStorage.getItem("userData")) : {};
        this.state = {
            userData,
            visitRecordsListData: [],
            PrecautionsData:[]
        }
        this.history = history;
    }

    componentDidMount() {
        // this.getVisitRecordsListData();
    }
    componentWillUnmount() {
        // 组件销毁前将静止让setState修改state的状态
        this.setState = (state,callback)=>{ return; }
    }

    // 获取就诊记录
    getVisitRecordsListData = () => {
        let { userData } = this.state;
        let data = {
            params: [{
                hospCode: userData.hisHospID,
                userCode: "ZYCPJS",
                patNO: userData.hisPatNo
            }]
        }
        $http.post("urlS", this, {
            code: "130983",
            data: data,
            namespace: "UPP",
            success: function (res) {
                if (+res.errorCode === 0) {
                    this.setState({ visitRecordsListData: res.result });
                } else {
                    this.setState({ visitRecordsListData: [] });
                }
            }
        });
    }

    render() {
        // let { visitRecordsListData } = this.state;
        // let detailData = visitRecordsListData && visitRecordsListData.length > 0 ? visitRecordsListData[0] : {};
        return (
            <div className="visit-records">
                123456
            </div>
        )
    }
}
