import React from 'react'; import './index.less'; import { Tabs } from 'antd-mobile'; import Page from '@src/containers/Page'; import Assets from '@src/components/Assets'; import { formatDate, getMap } from '@src/services/Tools'; import Money from '../../../components/Money'; import Button from '../../../components/Button'; import Tag from '../../../components/Tag'; import { Course } from '../../../stores/course'; import { DataType } from '../../../../Constant'; const DataTypeMap = getMap(DataType, 'value', 'label'); export default class extends Page { initState() { return { tab: 'content' }; } initData() { const { id } = this.state; Course.getData(id) .then((data) => { this.setState({ data }); }); } buy() { } renderView() { const { data = {}, tab } = this.state; return (
{data.title}
{data.isOriginal && 原创} {data.isNovice && 适合新手}
页数: {data.page}页
格式: {DataTypeMap[data.dataType]}
{formatDate(data.updateTime, 'YYYY-MM-DD HH:mm')} 更新
{ this.setState({ tab: value.key }); }} />
总额:
); } }