import React, { PureComponent } from 'react';
import { Tabs } from 'antd';
import style from "styled-components";

const store = require("store");

const { TabPane } = Tabs;

export default class TestPaper extends PureComponent {
  constructor(props, context) {
    super(props, context);
    this.state = {
      // currentURL: "http://localhost:3000/productdetail?tit=%E4%BF%9D%E5%AE%89%E5%9F%B9%E8%AE%AD%E8%AF%BE%E7%A8%8B&systype=saas",
      // currentURL:"http://localhost:3000/#/order?trackid=2&organID=70607bb974eb44bb9847909d3461bd70",
    };
  }
  componentDidMount = () => {
  }
  render() {
    return (
      <Container>
        <Tabs>
          <TabPane tab="试卷管理" key="1" />
        </Tabs>
        {store.get("TestPaperURL") !== undefined ? (
          <div style={{ height: "inherit" }}>
            <iframe title="试卷管理"
              src={store.get("TestPaperURL")["TestPaperURL"]}
              width="100%"
              height="100%"
              frameBorder="0"
              allowFullScreen={true}
              allowtransparency="true">
              您的浏览器不支持iframe，请升级
            </iframe>
          </div>
        ) : ''
        }
        {/* {store.get("saas") !== undefined ? (
          <iframe title="订单管理" src={this.state.currentURL + '&sessionId=' + store.get("saas")["sessionId"]} width="100%" height="100%" frameBorder="0">
            您的浏览器不支持iframe，请升级
            </iframe>
        ) : ''
        } */}
        {/* <iframe title="课程列表" src="http://localhost:3000/product" frameBorder="0" width="100%" height="100%">
            您的浏览器不支持iframe，请升级</iframe> */}
      </Container>
    );
  }
}

const Container = style.div`
  padding:10px 24px 24px;
  width:100%;
  height:100%;
`;
