|
|
|
@ -144,7 +144,11 @@ class CompetitionCommon extends Component{
|
|
|
|
|
console.log(error)
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.props.history.replace(module_url);
|
|
|
|
|
if(module_url.substring(0,7)=='http://'||module_url.substring(0,8)=='https://') {
|
|
|
|
|
window.location.href= module_url
|
|
|
|
|
}else{
|
|
|
|
|
window.location.href="https://"+module_url;
|
|
|
|
|
}
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -228,7 +232,7 @@ class CompetitionCommon extends Component{
|
|
|
|
|
<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}>
|
|
|
|
|
<img src={getImageUrl(bannerdata&&bannerdata.image_url)}/>
|
|
|
|
|
<img className={"image_urlbox"} src={getImageUrl(`images/educoder/competitions/mainbanner.jpg`)}/>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col className={"CompetitionCommonbannerfont mt50"} span={9}>
|
|
|
|
|
|
|
|
|
@ -303,17 +307,20 @@ class CompetitionCommon extends Component{
|
|
|
|
|
<Sider>
|
|
|
|
|
<Menu mode="inline" className="CompetitionMenu" defaultSelectedKeys={['1']} onClick={(e)=>this.getrightdatas(e)}>
|
|
|
|
|
{data&&data.competition_modules.map((item,key)=>{
|
|
|
|
|
return(
|
|
|
|
|
<Menu.Item key={item.position}>
|
|
|
|
|
{item.has_url===false?<span
|
|
|
|
|
// onClick={()=>this.getrightdata(item.id,item.module_type,item.module_url,item.has_url)}
|
|
|
|
|
>{item.name}</span>:<a
|
|
|
|
|
// target="_blank"
|
|
|
|
|
href={item.module_url}
|
|
|
|
|
// onClick={()=>this.getrightdata(item.id,item.module_type)}
|
|
|
|
|
>{item.name}</a>}
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
)
|
|
|
|
|
if(item.module_type!="enroll"){
|
|
|
|
|
return(
|
|
|
|
|
<Menu.Item key={item.position}>
|
|
|
|
|
{/*{item.has_url===false?<span*/}
|
|
|
|
|
{/*// onClick={()=>this.getrightdata(item.id,item.module_type,item.module_url,item.has_url)}*/}
|
|
|
|
|
{/*>{item.name}</span>:<a*/}
|
|
|
|
|
{/*// target="_blank"*/}
|
|
|
|
|
{/*href={item.module_url}*/}
|
|
|
|
|
{/*// onClick={()=>this.getrightdata(item.id,item.module_type)}*/}
|
|
|
|
|
{/*>{item.name}</a>}*/}
|
|
|
|
|
<a>{item.name}</a>
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
})}
|
|
|
|
|
</Menu>
|
|
|
|
|
</Sider>
|
|
|
|
|