竞赛详情头部调整

dev_sync_trustie
杨树明 5 years ago
parent eeb5019cb1
commit e9e9ba9d69

@ -60,22 +60,23 @@ class CompetitionCommon extends Component{
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}) })
//console.log(this.props)
if(this.props.user&&this.props.user.login!= ""){
const zul = `/competitions/${this.props.match.params.identifier}/competition_staff.json`;
axios.get((zul)).then((result) => {
if (result) {
if (result.data) {
this.setState({
signupdata:result.data
})
}
}
}).catch((error) => {
//console.log(error);
})
}
// console.log("调用了GetenrollmentAPI");
const zul = `/competitions/${this.props.match.params.identifier}/competition_staff.json`;
axios.get((zul)).then((result) => {
if (result) {
if (result.data) {
this.setState({
signupdata:result.data
})
}
}
}).catch((error) => {
//// //////console.log(error);
})
} }
getrightdatas=(e)=>{ getrightdatas=(e)=>{
@ -258,7 +259,7 @@ class CompetitionCommon extends Component{
已结束 已结束
</Button>: </Button>:
data.competition_status==="progressing"?<Button type="primary" block className={"Competitionfontsize22"}> data.competition_status==="progressing"?<Button type="primary" block className={"Competitionfontsize22"}>
data.mode===2?<a onClick={()=>this.gotocourse()}>立即报名</a>:<a onClick={()=>this.gotocourse(`/newcompetitions/${this.props.match.params.identifier}/enroll`)}></a> {data.mode===2?<a onClick={()=>this.gotocourse()}>立即报名</a>:<a onClick={()=>this.gotocourse(`/newcompetitions/${this.props.match.params.identifier}/enroll`)}></a>}
</Button>:""} </Button>:""}
</Col> </Col>
<Col className={"mt10 Competitionfontsize16"}>{data&&data.enroll_end_time===null?"":`报名截止时间:${data&&data.enroll_end_time}`}</Col> <Col className={"mt10 Competitionfontsize16"}>{data&&data.enroll_end_time===null?"":`报名截止时间:${data&&data.enroll_end_time}`}</Col>

Loading…
Cancel
Save