import { Component } from "react";
import { connect } from "dva";
import router from "umi/router";

@connect(({ global }) => ({
  global,
}))
export default class BasicIframe extends Component {
  constructor(props) {
    super(props);
    this.state = {
      currentSite: props.global.currentSite,
    }
    this.src = 'https://xinke.sutextech.com/admin/order/orderby9710/?token=7d591e1b1bd66c936f9b3b5bb153ca7a7f786626'
  }

  componentDidMount() {
    const { currentSite } = this.state;
    if (currentSite !== "1") {
      router.push("/manage_order/enquiry");
    }
  }

  render() {
    return (
      <div style={{ width: "100%", height: "100%" }}>
        <iframe
          src={this.src}
          width="100%"
          height="100%"
          frameBorder="0"
          allowFullScreen
        />
      </div>
    );
  }
}
