|
|
|
@ -5,6 +5,8 @@ import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
|
|
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
|
|
|
|
|
|
|
|
|
import { Modal} from 'antd';
|
|
|
|
|
|
|
|
|
|
// import searchImg from '../../../../images/educoder/icon/search.svg'
|
|
|
|
|
|
|
|
|
|
// /images/educoder/icon/search.svg
|
|
|
|
@ -134,7 +136,8 @@ class NewHeader extends Component {
|
|
|
|
|
ImageUrl:"",
|
|
|
|
|
ecUrl:null,
|
|
|
|
|
project_packages_url:null,
|
|
|
|
|
ImageUrlType:false
|
|
|
|
|
ImageUrlType:false,
|
|
|
|
|
competitiontype:false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
componentWillMount(){
|
|
|
|
@ -230,7 +233,28 @@ class NewHeader extends Component {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (window.localStorage) {
|
|
|
|
|
var uid = localStorage.getItem('competition_uid');
|
|
|
|
|
} else {
|
|
|
|
|
var uid = false
|
|
|
|
|
}
|
|
|
|
|
if(!uid){
|
|
|
|
|
this.setState({
|
|
|
|
|
competitiontype:true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setcompetitionfun=()=>{
|
|
|
|
|
this.competitionfun();
|
|
|
|
|
window.location.href="/competitions"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
competitionfun=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
competitiontype:false
|
|
|
|
|
})
|
|
|
|
|
localStorage.setItem('competition_uid', true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
@ -268,6 +292,45 @@ class NewHeader extends Component {
|
|
|
|
|
// console.log(match.path.startsWith("/ec_courses"))
|
|
|
|
|
return (
|
|
|
|
|
<div className="newHeader" id="nHeader">
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.competitiontype .ant-modal{
|
|
|
|
|
width: 615px !important;
|
|
|
|
|
}
|
|
|
|
|
.competitiontype .ant-modal-content{
|
|
|
|
|
background-color: transparent !important;
|
|
|
|
|
box-shadow: none !important;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<Modal
|
|
|
|
|
visible={this.state.competitiontype}
|
|
|
|
|
closable={false}
|
|
|
|
|
footer={null}
|
|
|
|
|
className={"competitiontype"}
|
|
|
|
|
>
|
|
|
|
|
<div className="login_reg pr login_regs">
|
|
|
|
|
<div style={{position: "relative"}} >
|
|
|
|
|
|
|
|
|
|
<a onClick={()=>this.competitionfun()} id="closeIcon"
|
|
|
|
|
style={{position: "absolute",right: "0px",top: "36px"}}
|
|
|
|
|
>
|
|
|
|
|
<i className="iconfont icon-shanchudiao"></i>
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
<img src={"http://localhost:3000/images/educoder/competitionslog.png"} height="600px" width="600px"/>
|
|
|
|
|
|
|
|
|
|
<a style={{position: "absolute",left:"39%", bottom:"18px"}} onClick={()=>this.setcompetitionfun()}>
|
|
|
|
|
<img height="40px" width="150px" src={"http://localhost:3000/images/educoder/applys.png"}/>
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</Modal>
|
|
|
|
|
<div className="educontent clearfix">
|
|
|
|
|
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/}
|
|
|
|
|
<a href="/">
|
|
|
|
@ -464,11 +527,3 @@ class NewHeader extends Component {
|
|
|
|
|
export default NewHeader;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// <ul id="header-nav">
|
|
|
|
|
// <li className="active">1{/*<%= link_to "首页", home_path %>*/}</li>
|
|
|
|
|
// <li>2{/*<%= link_to "精选实训", shixuns_path %>*/}</li>
|
|
|
|
|
// <li>3{/*<%= link_to "实训路径", subjects_path %>*/}</li>
|
|
|
|
|
// <li>4{/*<%= link_to "在线课堂", courses_path %>*/}</li>
|
|
|
|
|
// <li>5{/*<%= link_to "讨论组", forums_path %>*/}</li>
|
|
|
|
|
// </ul>
|
|
|
|
|