Commit 4b1e510f by xuzhenghua

大颗模块二

parent c40cd6c4
......@@ -125,8 +125,8 @@ class YearCourse extends Component {
if (code === 200) {
this.setState({
bigcourse: Object.assign({}, bigcourse, {
isMore: data.length > 4 ? true : false,
course: data.length > 4 ? data.filter((item, index) => index < 4) : data,
isMore: false,
course: data,
courseList: data,
})
})
......@@ -493,7 +493,7 @@ class YearCourse extends Component {
{
item.is_buy == 0 &&
<a onClick={() => this.toQQque()}
className="btn big-course">速抢拼团名额</a>
className="btn big-course">免费试听</a>
}
</div>
......@@ -501,12 +501,12 @@ class YearCourse extends Component {
))
}
</div>
{
(bigcourse.courseList && bigcourse.courseList.length > 4) &&
<button className="more-button" onClick={() => this.handleToMore('bigcourse')}>
{bigcourse.isMore ? '查看更多' : '收起'}
</button>
}
{/*{*/}
{/*(bigcourse.courseList && bigcourse.courseList.length > 4) &&*/}
{/*<button className="more-button" onClick={() => this.handleToMore('bigcourse')}>*/}
{/*{bigcourse.isMore ? '查看更多' : '收起'}*/}
{/*</button>*/}
{/*}*/}
</>
}
</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