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

import request from '../../../../utils/request';
import apis from '../../../../services/apis';

const AuthRes = props => {
  const authRes = props.authInfo
  console.log(authRes, 'authRes')

  return (
    <Modal footer={null} title="授权信息" visible={props.visable} onCancel={props.onCancel} width={800}>
      <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }}>
        <Form.Item label="授权状态">
          <span>{authRes.status === 1 ? '已授权':'未授权'}</span>
        </Form.Item>
        <Form.Item label="授权类型">
          <span>{authRes.authType === 1 ? '接口线上授权': authRes.authType === 2 ? '线下管理员授权' : ''}</span>
        </Form.Item>
        <Form.Item label="授权流水号">
        <span>{authRes.transactionId}</span>
        </Form.Item>
        <Form.Item label="授权合同编号">
        <span>{authRes.contractId}</span>
        </Form.Item>
      </Form>
    </Modal>
  );
}

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

export default WrappedBase

