import React from 'react'; import './index.less'; import Assets from '@src/components/Assets'; import Page from '@src/containers/Page'; import { getMap, formatMoney } from '@src/services/Tools'; import Footer from '../../../components/Footer'; import { FaqModal, FinishModal } from '../../../components/OtherModal'; import { CommentFalls, AnswerCarousel, Consultation, Contact } from '../../../components/Other'; import Button from '../../../components/Button'; import { User } from '../../../stores/user'; import { Main } from '../../../stores/main'; import { Course } from '../../../stores/course'; import { ServiceKey, ServiceParamMap } from '../../../../Constant'; import { Order } from '../../../stores/order'; import Video from '../../../components/Video'; export default class extends Page { initState() { return {}; } initData() { Main.getCourseIndex() .then(result => { this.setState({ courseIndex: result }); }); Main.getBase() .then(result => { this.setState({ base: result }); }); Course.listPackage({ isSpecial: true, page: 1, size: 3 }) .then(result => { this.setState({ packages: result.list || [] }); }); Main.listFaq({ page: 1, size: 100, channel: 'course-index' }).then(result => { this.setState({ faqs: result.list }); }); Main.listComment({ page: 1, size: 100, channel: 'course-index' }).then(result => { this.setState({ comments: result.list }); }); } renderView() { const { courseIndex = {}, base = {}, packages = [], faqs = [], comments = [], showFaq, faq = {}, showFinish } = this.state; return (
找到你的Style
{courseIndex.onlineVideo ?
{courseIndex.vsVideo ?
{packages.map(data => { const originMoney = data.courses.reduce((a, y) => a + y.price, 0); const novice = data.courses.filter(row => row.crowd !== 'novice').length === 0; return
{novice && }
{data.description}
包含课程
{data.courses.map((course => { return
{course.title}({course.noNumber}课时)
; }))}
配套服务
预习作业
课后答题
赠送服务
{data.gift && ServiceKey.map(row => { if (!data.gift[row.value]) return null; const list = ServiceParamMap[row.value]; if (list) { const map = getMap(list, 'value', 'label'); return
{row.label}×{map[data.gift[row.value]]}
; } return
{row.label}×{data.gift[row.value]}
; })}
总价值: ¥{formatMoney(originMoney)}
套餐价: ¥{formatMoney(data.price)}
; })}
You will always find the answers
Self-Paced
随时随地学习;不限听课次数;支持停课申请。
实力导师
从业8年,考取700+成绩10次。
激励机制
保持听课频率,赠送课程时效。
User.needLogin().then(() => this.setState({ showFaq: true, faq: { channel: 'course-index' } }))} />
); } }