dev_aliyun
杨树明 5 years ago
parent a144596983
commit b091c01777

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

Loading…
Cancel
Save