dev_aliyun
daiao 5 years ago
commit 9af83480be

@ -12,15 +12,31 @@
<div class="educontent newLogipopup" id="backImg" >
<div class="pr edu-txt-center height-100 pt110">
<div class="login_reg pr login_regs">
<div>
<a href="javascript:void(0)" onclick="hideModal();" id="closeIcon" style="position: absolute;right: 0px;"><i class="iconfont icon-shanchudiao"></i></a>
<div style="position: relative;">
<a href="javascript:void(0)" onclick="competitionfun();" id="closeIcon" style="position: absolute;right: 0px;top: 36px;">
<i class="iconfont icon-shanchudiao"></i>
</a>
<img src="/images/educoder/competitionslog.png" height="600px" width="600px" />
<img height="600px" width="600px" src="/images/educoder/applys.png" />
<a style="position: absolute;left:39%; bottom:18px;" onclick="setcompetitionfun();" >
<img height="40px" width="150px" src="/images/educoder/applys.png" />
</a>
</div>
</div>
</div>
</div>
<script>
console.log("############");
</script>
function competitionfun(){
localStorage.setItem('competition_uid', true);
}
function setcompetitionfun(){
competitionfun();
window.location.href="/competitions"
}
</script>

@ -128,6 +128,7 @@
$("#all_status_show_value").text("用户");
<% end %>
<% end %>
if (window.localStorage) {
var uid = localStorage.getItem('competition_uid');
} else {

@ -93,4 +93,17 @@
var sl=-Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);
document.getElementById('nHeader').style.left=sl+'px';
};
$(function() {
if (window.localStorage) {
var uid = localStorage.getItem('competition_uid');
} else {
var uid = false
}
if(!uid){
var htmlvalue = "<%= escape_javascript(render :partial => 'competitions/competitions_name')%>";
pop_box_new(htmlvalue, 500, 380);
}
})
</script>

@ -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={"/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={"/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>

@ -1243,6 +1243,6 @@ html>body #ajax-indicator { position: fixed; }
}
.login_regs{
margin-right: 35%;
width: 558px;
width: 580px !important;
cursor: pointer;
}
Loading…
Cancel
Save