|
@@ -10,6 +10,7 @@ import TotalSort from '../TotalSort';
|
|
|
import Date from '../Date';
|
|
|
import Ratio from '../Ratio';
|
|
|
import { My } from '../../stores/my';
|
|
|
+import { Main } from '../../stores/main';
|
|
|
import { PrepareStatus, PrepareExaminationTime, PrepareScoreTime } from '../../../Constant';
|
|
|
|
|
|
const PrepareStatusMap = getMap(PrepareStatus, 'value', 'short');
|
|
@@ -85,6 +86,9 @@ export default class extends Component {
|
|
|
result.prepareScoreTime = result.prepareScoreTime ? moment(result.prepareScoreTime) : null;
|
|
|
this.setState({ data: result, stat, first: !result.prepareStatus, step: !result.prepareStatus ? 0 : 4 });
|
|
|
});
|
|
|
+ Main.getContract('register').then(() => {
|
|
|
+ this.setState({ link: { url: 'www', title: '了解出分时间信息>' } });
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
onChange(type, key) {
|
|
@@ -112,16 +116,22 @@ export default class extends Component {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ onClose() {
|
|
|
+ const { onClose } = this.props;
|
|
|
+ if (onClose) onClose();
|
|
|
+ this.setState({ step: 0 });
|
|
|
+ }
|
|
|
+
|
|
|
render() {
|
|
|
const { step } = this.state;
|
|
|
- const { show, onClose } = this.props;
|
|
|
+ const { show } = this.props;
|
|
|
return (
|
|
|
<Modal
|
|
|
className="examination-modal"
|
|
|
show={show}
|
|
|
width={460}
|
|
|
{...this.stepProp[step]}
|
|
|
- onClose={() => onClose && onClose()}
|
|
|
+ onClose={() => this.onClose()}
|
|
|
>
|
|
|
<div className="examination-modal-wrapper">{this[`renderStep${step}`]()}</div>
|
|
|
</Modal>
|
|
@@ -202,11 +212,13 @@ export default class extends Component {
|
|
|
}
|
|
|
|
|
|
renderStep3() {
|
|
|
- const { data } = this.state;
|
|
|
+ const { data, link, step } = this.state;
|
|
|
const { prepareScoreTime } = data;
|
|
|
return (
|
|
|
<div className="step-3-layout">
|
|
|
+ {link && <a href={link.url} className="a-l" target='_blank'>{link.title}</a>}
|
|
|
<Date
|
|
|
+ show={step === 3}
|
|
|
value={prepareScoreTime}
|
|
|
onChange={(date) => {
|
|
|
this.onChange('prepareScoreTime', date);
|