Commit c07ce304 by zhanghaozhe

限时免费

parent 1bd5dcab
...@@ -70,9 +70,9 @@ class LimitFree extends Component { ...@@ -70,9 +70,9 @@ class LimitFree extends Component {
} }
} }
getCourse = id => { getCourse = (courseId, vCourseId) => {
http.post(`${API.home}/sys/limitFree/receive`, { http.post(`${API.home}/sys/limitFree/receive`, {
course_id: id course_id: courseId
}) })
.then(res => { .then(res => {
const {code, msg} = res.data const {code, msg} = res.data
...@@ -93,7 +93,7 @@ class LimitFree extends Component { ...@@ -93,7 +93,7 @@ class LimitFree extends Component {
}}>知道了 }}>知道了
</button> </button>
<button onClick={() => { <button onClick={() => {
this.toPlay(id) this.toPlay(vCourseId)
instance.close() instance.close()
}}>立即学习 }}>立即学习
</button> </button>
...@@ -175,7 +175,7 @@ class LimitFree extends Component { ...@@ -175,7 +175,7 @@ class LimitFree extends Component {
<span className={'origin-price'}>¥{item.price0}</span> <span className={'origin-price'}>¥{item.price0}</span>
<button onClick={e => { <button onClick={e => {
e.stopPropagation() e.stopPropagation()
this.getCourse(item.course_id) this.getCourse(item.course_id, item.v_course_id)
}}>免费领取 }}>免费领取
</button> </button>
</div> </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