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 { My } from '../../../stores/my'; import { ServiceKey } from '../../../../Constant'; const ServiceKeyMap = getMap(ServiceKey, 'value', 'label'); export default class extends Page { initData() { const { id } = this.params; My.getRecord(id) .then(result => { this.setState(result); }); } submit() { My.useRecord(this.params.id) .then(); } renderView() { const { productType } = this.state; if (productType === 'service') { return this.renderService(); } return this.renderCourse(); } renderCourse() { const { course = {}, endTime } = this.state; if (!endTime) return null; return (