Commit c4760d7e by wangshuo

详情页大纲中的试听修改

parent bba9926f
......@@ -318,15 +318,13 @@ class Detail extends Component {
}
// 点击子组件试听按钮
toAudition = () => {
toAudition = (v_course_id, video_id) => {
const {user} = this.props
const uid = user && user.data && user.data.uid
if (!uid) {
this.props.history.push('/passport/login')
} else {
this.setState({
auditionBox: true,
})
this.props.history.push(`/play/video?id=${v_course_id}&video_id=${video_id}`);
}
}
// 点击子组件单集购买按钮
......
......@@ -93,9 +93,9 @@ class OutLine extends Component {
6-可试听但无试听权限
*/}
{ // 试听
!introduce.is_aist && item.class_status === 6 &&
!introduce.is_aist && (item.class_status === 6 || item.class_status === 5) &&
<span className='btn-right-10 audition'
onClick={this.props.toAudition}>试听
onClick={e => this.props.toAudition(introduce.v_course_id, item.video_id)}>试听
<i className='iconfont iconcelluar'></i>
</span>
}
......
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