import React, { Component } from 'react'; import { connect } from 'react-redux'; import DocumentTitle from 'react-document-title'; import 'antd-mobile/dist/antd-mobile.less'; import Xt from './xt'; import ZaXt from './zaXt'; import ZaJd from './zaJd'; import Jd from './jd'; import DnaXt from './dnaXt'; import DnaYsfyXt from './dnaYsfyXt'; import Dg from './dg'; import Mq from './mq'; import GeneReport from './geneReport'; import Country from './country'; import Normal from './normal'; import DnaAppRaisal from './dnaAppRaisal'; @connect(({ ckuCertificate }) => ({ ckuCertificate })) class Index extends Component { constructor(props) { super(props); this.state = {}; } componentWillMount = () => { }; componentDidMount = () => { const { id, token, type, club } = this.props.location.query; if (token) { window.sessionStorage.setItem('token', token); window.sessionStorage.setItem('club', club) } if (type === 'gene') { //基因报告 if (id) { this.props.dispatch({ type: 'ckuCertificate/geneReport', payload: { id, }, }); } } else { //cku证书 if (id) { this.props.dispatch({ type: 'ckuCertificate/certificateInfo', payload: { id, }, }); } } }; componentWillUnmount = () => { this.props.dispatch({ type: 'ckuCertificate/clean', }); }; render() { const data = this.props.ckuCertificate; const { type } = this.props.location.query; return (