import React from 'react'; import './index.less'; import { Tabs } from 'antd-mobile'; import Page from '@src/containers/Page'; import Money from '../../../components/Money'; import Button from '../../../components/Button'; import { FAQItem, CommentItem } from '../../../components/Item'; import { Course } from '../../../stores/course'; import { Order } from '../../../stores/order'; import { PcUrl } from '../../../../Constant'; export default class extends Page { initState() { return { tab: 'teacherContent' }; } initData() { const { id } = this.params; Course.get(id).then(result => { this.setState({ data: result }); }); } buy() { Order.speedPay({ productType: 'course', productId: this.params.id }) .then((result) => { linkTo(`/pay/${result.id}`); }); } renderText() { const { tab, data } = this.state; let content; switch (tab) { case 'teacherContent': case 'baseContent': case 'pointContent': content =
; break; case 'faq': content =