|
|
|
@ -50,7 +50,7 @@ class CompetitionCommon extends Component{
|
|
|
|
|
if(response.status===200){
|
|
|
|
|
this.setState({
|
|
|
|
|
data:response.data,
|
|
|
|
|
thiskeys:response.data.competition_modules[0].position
|
|
|
|
|
thiskeys:response.data.competition_modules[0].id
|
|
|
|
|
})
|
|
|
|
|
this.getrightdata(
|
|
|
|
|
response.data.competition_modules[0].id,
|
|
|
|
@ -93,7 +93,7 @@ class CompetitionCommon extends Component{
|
|
|
|
|
})
|
|
|
|
|
data&&data.competition_modules.map((item,key)=>{
|
|
|
|
|
if(item.module_type!="enroll") {
|
|
|
|
|
if (keys === item.position) {
|
|
|
|
|
if (keys === item.id) {
|
|
|
|
|
this.getrightdata(item.id, item.module_type, item.module_url, item.has_url, listkey)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
@ -251,27 +251,27 @@ class CompetitionCommon extends Component{
|
|
|
|
|
this.props.current_user&&this.props.current_user.admin===true?"":this.props.current_user&&this.props.current_user.business===true?"":<div className={"CompetitionsListzhezhao"}>即将发布 敬请期待</div>:""}
|
|
|
|
|
<img className={"Commonimg"}
|
|
|
|
|
src={data.competition_status==="ended"?getImageUrl(`images/educoder/competitions/groups1.png`):data.competition_status==="nearly_published"?getImageUrl(`images/educoder/competitions/groups2.png`):data.competition_status==="progressing"?getImageUrl(`images/educoder/competitions/groups3.png`):""} />
|
|
|
|
|
<Col span={15}>
|
|
|
|
|
<Col span={15} className={"Commonimgbox"}>
|
|
|
|
|
<img className={"image_urlbox"} src={data===undefined?getImageUrl(`images/educoder/competitions/mainbanner.jpg`):data.avatar_url===null?getImageUrl(`images/educoder/competitions/mainbanner.jpg`):getImageUrl(data.avatar_url)}/>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col className={"CompetitionCommonbannerfont"} span={9}>
|
|
|
|
|
|
|
|
|
|
<Col className={data&&data.name.length>15?"competitionbannerdiv":"competitionbannerdiv mt30"}>{data&&data.name}</Col>
|
|
|
|
|
<Col className={data&&data.name.length>15?"competitionbannerdiv mt30":"competitionbannerdiv mt30"}>{data&&data.name}</Col>
|
|
|
|
|
|
|
|
|
|
<Col className={"competitionbannerdiv"}>
|
|
|
|
|
<Col className={"Competitioncolor9b"}>竞赛时间:</Col>
|
|
|
|
|
<Col>{data&&data.start_time}~{data&&data.end_time}</Col>
|
|
|
|
|
<Col className={"competitionbannerdiv mt10"}>
|
|
|
|
|
<Col className={"Competitioncolor9b"}>竞赛时间:<span className={"color000"}>{data&&data.start_time}~{data&&data.end_time}</span></Col>
|
|
|
|
|
{/*<Col></Col>*/}
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
|
|
<Col className={"competitionbannerdiv"}>
|
|
|
|
|
<Col className={"competitionbannerdiv mt10"}>
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
<Col className="gutter-row" span={6}>
|
|
|
|
|
<div className="gutter-box CompetitionsIndexdadels Competitioncolor77">奖金</div>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col className="gutter-row ml20" span={6}>
|
|
|
|
|
<Col className="gutter-row ml20 rankbeicenter" span={6}>
|
|
|
|
|
<div className="gutter-box CompetitionsIndexdadels Competitioncolor77">浏览数</div>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col className="gutter-row" span={6}>
|
|
|
|
|
<Col className="gutter-row rankbeicenter" span={6}>
|
|
|
|
|
<div className="gutter-box CompetitionsIndexdadels Competitioncolor77">报名数</div>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
@ -280,10 +280,10 @@ class CompetitionCommon extends Component{
|
|
|
|
|
<Col className="gutter-row" span={6}>
|
|
|
|
|
<div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516">¥{data&&data.bonus}</div>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col className="gutter-row ml20" span={6}>
|
|
|
|
|
<Col className="gutter-row ml20 rankbeicenter" span={6}>
|
|
|
|
|
<div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516">{data.competition_status==="nearly_published"?"--":data&&data.visits_count}</div>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col className="gutter-row" span={6}>
|
|
|
|
|
<Col className="gutter-row rankbeicenter" span={6}>
|
|
|
|
|
<div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516" onClick={data.competition_status==="nearly_published"?"":()=>this.gotocourse(`/newcompetitions/${this.props.match.params.identifier}/enroll`)}>{data.competition_status==="nearly_published"?"--":data&&data.member_count}</div>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
@ -309,7 +309,7 @@ class CompetitionCommon extends Component{
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>}
|
|
|
|
|
<Col className={"competitionbannerdiv mt10"}>
|
|
|
|
|
<Col className={"competitionbannerdiv mt20"}>
|
|
|
|
|
{data.competition_status==="ended"?
|
|
|
|
|
<Button type="primary" block className={"Competitionfontsize22"} disabled={true}>
|
|
|
|
|
已结束
|
|
|
|
@ -327,11 +327,11 @@ class CompetitionCommon extends Component{
|
|
|
|
|
|
|
|
|
|
<Layout className={'teamsLayout mt40'}>
|
|
|
|
|
<Sider>
|
|
|
|
|
<Menu mode="inline" className="CompetitionMenu" defaultSelectedKeys={['1']} onClick={(e)=>this.getrightdatas(e)}>
|
|
|
|
|
<Menu mode="inline" className="CompetitionMenu" defaultSelectedKeys={[`${this.state.thiskeys}`]} onClick={(e)=>this.getrightdatas(e)}>
|
|
|
|
|
{data&&data.competition_modules.map((item,key)=>{
|
|
|
|
|
if(item.module_type!="enroll"){
|
|
|
|
|
return(
|
|
|
|
|
<Menu.Item key={item.position}>
|
|
|
|
|
<Menu.Item key={item.id}>
|
|
|
|
|
{/*{item.has_url===false?<span*/}
|
|
|
|
|
{/*// onClick={()=>this.getrightdata(item.id,item.module_type,item.module_url,item.has_url)}*/}
|
|
|
|
|
{/*>{item.name}</span>:<a*/}
|
|
|
|
|