Commit a1e73acf by zhanghaozhe

Merge branch 'limit-free' into pre

parents 8e3a4415 16faa68d
...@@ -71,12 +71,6 @@ class Index extends Component { ...@@ -71,12 +71,6 @@ class Index extends Component {
if (res.data.code === 200) { if (res.data.code === 200) {
const {data} = res.data || {} const {data} = res.data || {}
const modules = Array.isArray(data.modules) ? data.modules : [] const modules = Array.isArray(data.modules) ? data.modules : []
modules.forEach(item => {
if (item.name === '限时免费') {
item.showMoreButon = item.list.length && item.list.length > 4
item.list = item.list.slice(0, 4)
}
})
this.setState({ this.setState({
banner: data.banner, banner: data.banner,
lives: data.lives, lives: data.lives,
...@@ -258,8 +252,7 @@ function CourseList({modules, toDetail}) { ...@@ -258,8 +252,7 @@ function CourseList({modules, toDetail}) {
{ {
modules.show_more === 2 ? modules.show_more === 2 ?
modules.name === '限时免费' modules.name === '限时免费'
? modules.showMoreButon && ? <Link className="more" to={'/free'}>更多 ></Link>
<Link className="more" to={'/free'}>更多 ></Link>
: <Link className="more" to={modules.more_page}>更多 ></Link> : <Link className="more" to={modules.more_page}>更多 ></Link>
: null : null
} }
...@@ -284,21 +277,6 @@ function CourseList({modules, toDetail}) { ...@@ -284,21 +277,6 @@ function CourseList({modules, toDetail}) {
</div> </div>
) )
/*const bottom = (
<div>
{
item.is_limit_free
? <LimitFree course={item}/>
: item.is_buy
? <a className="isbuy">已购买</a>
: <p className="course-price">
<span className="new">¥{item.discounts_price}</span>
<span className="old">¥{item.price}</span>
</p>
}
</div>
)*/
const bottom = <Bottom course={item}/> const bottom = <Bottom course={item}/>
const status = item.is_limit_free ? null : <div> const status = item.is_limit_free ? null : <div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment