|
@@ -142,7 +142,10 @@ export default class extends Page {
|
|
|
}
|
|
|
|
|
|
renderView() {
|
|
|
- const { show, showEnd } = this.state;
|
|
|
+ const { show, showEnd, showContract } = this.state;
|
|
|
+ if (showContract) {
|
|
|
+ return this.renderContract();
|
|
|
+ }
|
|
|
if (show) {
|
|
|
return this.renderPay();
|
|
|
}
|
|
@@ -175,13 +178,11 @@ export default class extends Page {
|
|
|
商品信息
|
|
|
</div>
|
|
|
{content}
|
|
|
- {info.refund_policy && [< div className="title">退款政策</div>,
|
|
|
- <div className="desc">{info.refund_policy}</div>]}
|
|
|
- {info.copyright_notes && [<div className="title">版权说明</div>,
|
|
|
- <div className="desc">{info.copyright_notes}</div>]}
|
|
|
+ {info.refund_policy && [< div className="title">退款政策</div>, <div className="desc">{info.refund_policy}</div>]}
|
|
|
+ {info.copyright_notes && [<div className="title">版权说明</div>, <div className="desc">{info.copyright_notes}</div>]}
|
|
|
{order.productTypes && order.productTypes.indexOf('course') > 0 && <div className="agree">
|
|
|
<Checkbox checked={checked} onChange={() => this.setState({ checked: !checked })} />
|
|
|
- 我已阅读并同意 <a onClick={() => this.setState({ showContract: true })}>{contract.title}</a>
|
|
|
+ 我已阅读并同意 <a onClick={() => this.setState({ showContract: true })}>《{contract.title}》</a>
|
|
|
</div>}
|
|
|
<div className="fixed">
|
|
|
<div className="tip">*若在购买过程中遇到问题,请联系千行小助手协助解决</div>
|
|
@@ -267,4 +268,10 @@ export default class extends Page {
|
|
|
</div>
|
|
|
);
|
|
|
}
|
|
|
+
|
|
|
+ renderContract() {
|
|
|
+ const { contract } = this.state;
|
|
|
+
|
|
|
+ return <div dangerouslySetInnerHTML={{ __html: contract.content }} />;
|
|
|
+ }
|
|
|
}
|