dev_aliyun
杨树明 5 years ago
parent a144596983
commit b091c01777

@ -30,35 +30,3 @@
</div> </div>
<div id="trophyreturn" class="-task-sidebars" style="right: 65px !important;width: 154px;">
<a onclick="trophyreturnfun();" id="closeIcon" style="position: absolute;right: 12px;top: 10px; color: #000;">
<i class="iconfont icon-shanchudiao"></i>
</a>
<a href="/competitions">
<img src="/images/educoder/competition/lvmeng.png" width="150px" height="150px">
</a>
</div>
<script>
function trophyreturnfun(){
$("#trophyreturn").hide()
localStorage.setItem('trophy_uid', true);
}
$(function() {
var trophy_uid = false;
if (window.localStorage) {
trophy_uid = localStorage.getItem('trophy_uid');
} else {
trophy_uid = false
}
if(trophy_uid==="true"||trophy_uid===true){
$("#trophyreturn").hide()
}
})
</script>

@ -13,26 +13,26 @@ class SiderBar extends Component {
} }
componentDidMount() { componentDidMount() {
window._initSider(); // window._initSider();
var trophy_uid = false; // var trophy_uid = false;
if (window.localStorage) { // if (window.localStorage) {
trophy_uid = localStorage.getItem('trophy_uid'); // trophy_uid = localStorage.getItem('trophy_uid');
} else { // } else {
trophy_uid = false // trophy_uid = false
} // }
if(trophy_uid==="true"||trophy_uid===true){ // if(trophy_uid==="true"||trophy_uid===true){
this.setState({ // this.setState({
trophyreturn:true // trophyreturn:true
}) // })
} // }
} }
trophyreturnfun=()=>{ trophyreturnfun=()=>{
this.setState({ // this.setState({
trophyreturn:true // trophyreturn:true
}) // })
localStorage.setItem('trophy_uid', true); // localStorage.setItem('trophy_uid', true);
} }
render() { render() {
return ( return (
@ -70,15 +70,15 @@ class SiderBar extends Component {
</div> </div>
</div> </div>
{this.state.trophyreturn===true?"":<div className="-task-sidebars" style={{right: "65x",width: "154px"}}> {/*{this.state.trophyreturn===true?"":<div className="-task-sidebars" style={{right: "65x",width: "154px"}}>*/}
<a onClick={this.trophyreturnfun} id="closeIcon" {/* <a onClick={this.trophyreturnfun} id="closeIcon"*/}
style={{position: "absolute", right: "12px",top:"10px",color: "#000"}}> {/* style={{position: "absolute", right: "12px",top:"10px",color: "#000"}}>*/}
<i className="iconfont icon-shanchudiao"></i> {/* <i className="iconfont icon-shanchudiao"></i>*/}
</a> {/* </a>*/}
<a href="/competitions"> {/* <a href="/competitions">*/}
<img src={getImageUrl("images/educoder/competition/lvmeng.png")} width="150px" height="150px" /> {/* <img src={getImageUrl("images/educoder/competition/lvmeng.png")} width="150px" height="150px" />*/}
</a> {/* </a>*/}
</div>} {/*</div>}*/}
</div> </div>
); );

Loading…
Cancel
Save