Commit 3da68356 by xuzhenghua

判断是否是python

parents 3d7fc4d9 a2291208
......@@ -284,6 +284,7 @@ class BargainMiddlePage extends Component {
}
this.getBargainInfo()
this.getBargainRankList(getParam('id'), 1)
} else if (res.data.code == 4030 || res.data.code == 4040) {
......@@ -376,6 +377,9 @@ class BargainMiddlePage extends Component {
if(bargain_status === 0) {
bargainBtn = <button className='active-btn' onClick={this.shareFriendBargain}>邀请好友砍价</button>
}
else {
bargainBtn = <button className={'invalid-btn'}>砍价结束</button>
}
}else {
if(assist_status === 0 && bargain_status === 0) {
bargainBtn = <button className='active-btn' onClick={this.friendBargainFirst}>帮好友砍一刀</button>
......@@ -422,6 +426,9 @@ class BargainMiddlePage extends Component {
/>
</ul>
<div className="bargain-detail">
{
(this.state.data.bargain_status == 0 || this.state.data.bargain_status == 1) &&
<div>
<div className="top">
<div>
已砍<span className={'reduced-price'}>{this.state.bargainData.bargain_price}</span>
......@@ -446,6 +453,8 @@ class BargainMiddlePage extends Component {
<div className="middle">
<span style={{width: this.state.width}}></span>
</div>
</div>
}
{
this.state.isOriginator === 1 && this.state.data.bargain_status === 0 &&
<div>
......@@ -625,13 +634,13 @@ function CourseDes(props) {
<span className={'discount-price'}>{course.course_price}</span>
{/* is_originator 是否发起人 0-否 1-是 */}
{
(is_originator === 1 && bargain_status !== 3) &&
(is_originator == 1 && bargain_status == 0 || bargain_status == 1) &&
<button className={'purchase-btn'} onClick={toCart}>
¥{course.pay_price}去支付
</button>
}
{
(is_originator === 1 && bargain_status === 3) &&
(is_originator == 1 && bargain_status == 3) &&
<span className="course-button__buy--done">已购买</span>
}
</div>
......
......@@ -340,6 +340,10 @@ class Detail extends Component {
course: data
});
if (data.course_info) {
if(data.course_info.is_it_course == 1){
this.props.history.push(`/python?id=${id}`)
}
let course_info = data.course_info;
document.title = `${course_info.course_title} - 七月在线`;
if (course_info.group_status === 3 || course_info.group_status === 4) {
......
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