Commit 7dde01da by zhanghaozhe

限时免费

parent 8c943d62
......@@ -532,7 +532,14 @@ class BtnStatus extends Component {
<span>课程咨询</span>
</a>
<button className={'get-course btn'} onClick={() => {this.props.getCourse(info.course_id)}}>立即领取</button>
<button className={'get-course btn'} onClick={() => {
const {history, user, getCourse} = this.props
if(user.hasError){
history.push('/passport')
}else {
getCourse(info.course_id)
}
}}>立即领取</button>
</div>
}
......
......@@ -539,6 +539,8 @@ class Detail extends Component {
render() {
const {course: {course_info = {}}, barInfo, singleBox, singleType, isRedPacket, countDownTime} = this.state;
const {d, h, m} = this.formatTime(course_info.limit_free_time)
let courseInfo = '',
service = '',
number = 0,
......@@ -627,7 +629,7 @@ class Detail extends Component {
:
course_info.limit_free_status == 1
? <div className={'time-limit'}>
<span>有效期7天,051423分后过期</span>
<span>有效期7天,{d}{h}{m}分后过期</span>
</div>
: null
: null
......
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