// import React from 'react'; import './index.less'; import Page from '@src/containers/Page'; // import Assets from '@src/components/Assets'; // import { getMap, formatDate } from '@src/services/Tools'; // import Checkbox from '../../../components/CheckBox'; // import Button from '../../../components/Button'; // import Icon from '../../../components/Icon'; import { Order } from '../../../stores/order'; import { Main } from '../../../stores/main'; // import { ServiceKey } from '../../../../Constant'; // const ServiceKeyMap = getMap(ServiceKey, 'value', 'label'); export default class extends Page { initState() { return {}; } initData() { const { id } = this.params; Order.getOrder(id) .then(result => { this.setState({ data: result }); }); Main.getContract('course') .then(result => { this.setState({ contract: result }); }); } pay() { const { id } = this.params; Order.wechatJs(id) .then(() => { }); } renderView() { const { productType } = this.state; if (productType === 'data') { return this.renderData(); } if (productType === 'course_package') { return this.renderCoursePackage(); } return this.renderSingle(); } renderData() { } renderCoursePackage() { } renderSingle() { } }