Commit 64305829 by zhanghaozhe

Merge branch 'limit-free' into dev

parents 81040e79 3316cba4
......@@ -298,7 +298,6 @@ class BtnStatus extends Component {
// 隐藏弹窗
handleToHide = (key) => {
console.log(key);
this.setState({
[key]: false
});
......@@ -525,6 +524,10 @@ class BtnStatus extends Component {
}
{
/*
*
* limit_free_status: 0 未领取 1已领取未过期 2已过期
* */
info.is_limit_free && info.limit_free_status == 0 && <div className='btns-box'>
<a className='consult consult-m' onClick={()=>this.qimoChatClick()}>
<i className='iconfont iconerji'></i>
......@@ -536,7 +539,7 @@ class BtnStatus extends Component {
if(user.hasError){
history.push('/passport')
}else {
getCourse(info.course_id)
getCourse(info.course_id, info.v_course_id)
}
}}>立即领取</button>
</div>
......
......@@ -498,10 +498,10 @@ class Detail extends Component {
m: Math.floor(seconds / 60 % 60).toString().padStart(2, '0')
})
getCourse = id => {
getCourse = (courseId, vCourseId) => {
const {history} = this.props
http.post(`${API.home}/sys/limitFree/receive`, {
course_id: id
course_id: courseId
})
.then(res => {
const {code, msg} = res.data
......@@ -522,7 +522,7 @@ class Detail extends Component {
}}>知道了
</button>
<button onClick={() => {
history.push(`/play/video?id=${id}`)
history.push(`/play/video?id=${vCourseId}`)
instance.close()
}}>立即学习
</button>
......
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