|
|
|
@ -224,6 +224,18 @@ class CompetitionCommon extends Component{
|
|
|
|
|
Competitionedittype:false
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
newgotocourse=(url)=>{
|
|
|
|
|
if(this.props.checkIfLogin()===false){
|
|
|
|
|
this.props.showLoginDialog()
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if(this.props.checkIfProfileCompleted()===false){
|
|
|
|
|
this.props.showProfileCompleteDialog()
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
window.open(url);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gotocourse=(url)=>{
|
|
|
|
@ -267,7 +279,7 @@ class CompetitionCommon extends Component{
|
|
|
|
|
let urls = `/competitions/${this.props.match.params.identifier}/enroll`;
|
|
|
|
|
this.Personalregistration(urls)
|
|
|
|
|
} else {
|
|
|
|
|
this.props.history.replace(url);
|
|
|
|
|
window.open(url);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -379,8 +391,24 @@ class CompetitionCommon extends Component{
|
|
|
|
|
className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516">{data.competition_status === "nearly_published" ? "--" : data && data.visits_count}</div>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col className="gutter-row rankbeicenter" span={6}>
|
|
|
|
|
|
|
|
|
|
{data.competition_status === "ended" ?
|
|
|
|
|
<div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516 cursorpointer"
|
|
|
|
|
// 已结束onClick={data.competition_status === "nearly_published" ? "" : () => this.gotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)}
|
|
|
|
|
onClick={ data.mode === 2 ?() => this.newgotocourse(`/courses/${data.course_id}`):() => this.newgotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)}
|
|
|
|
|
>{data && data.member_count}</div>
|
|
|
|
|
:data.competition_status === "nearly_published" ?
|
|
|
|
|
<div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516"
|
|
|
|
|
onClick={data.competition_status === "nearly_published" ? "" : () => this.gotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)}>{data.competition_status === "nearly_published" ? "--" : data && data.member_count}</div>
|
|
|
|
|
// onClick={data.competition_status === "nearly_published" ? "" : () => this.gotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)}
|
|
|
|
|
>{"--"}</div> :
|
|
|
|
|
data.competition_status === "progressing" ?
|
|
|
|
|
data.mode === 2 ?
|
|
|
|
|
<div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516 cursorpointer" onClick={() => this.gotocourse()}>{data && data.member_count}</div> : signupdata && signupdata.personal === true ?
|
|
|
|
|
<div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516 cursorpointer" onClick={() => this.gotocourse("personal")}>{data && data.member_count}</div> : <div
|
|
|
|
|
className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516 cursorpointer"
|
|
|
|
|
onClick={() => this.gotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)}>{data && data.member_count}</div>
|
|
|
|
|
:""}
|
|
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
</Col>
|
|
|
|
|