|
|
|
@ -68,17 +68,21 @@ class ListPageIndex extends Component{
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
|
|
|
|
this.state={
|
|
|
|
|
yslGuideone:null,
|
|
|
|
|
yslGuideone:undefined,
|
|
|
|
|
mysearch:undefined,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount(){
|
|
|
|
|
var yslGuideone = window.localStorage.getItem('yslGuideone');
|
|
|
|
|
var yslGuideone = window.sessionStorage.getItem('yslGuideone');
|
|
|
|
|
console.log("77");
|
|
|
|
|
console.log(yslGuideone);
|
|
|
|
|
var mysearchs= this.props.location.search===""?undefined:this.props.location.search===undefined?undefined:this.props.location.search==="?exhibition=true"?true:undefined;
|
|
|
|
|
this.setState({
|
|
|
|
|
yslGuideone:yslGuideone,
|
|
|
|
|
mysearch:mysearchs,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//
|
|
|
|
|
// getleftNavid=(navid,newselectnavid)=>{
|
|
|
|
@ -88,34 +92,44 @@ class ListPageIndex extends Component{
|
|
|
|
|
// navttype:newselectnavid
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
setwindowlocal=(bool)=>{
|
|
|
|
|
window.localStorage.setItem('yslGuideone', bool);
|
|
|
|
|
componentWillUnmount(){
|
|
|
|
|
window.sessionStorage.setItem('yslGuideone', false);
|
|
|
|
|
}
|
|
|
|
|
setwindowlocal=(bool)=>{
|
|
|
|
|
window.sessionStorage.setItem('yslGuideone', bool);
|
|
|
|
|
this.setState({
|
|
|
|
|
yslGuideone:bool,
|
|
|
|
|
})
|
|
|
|
|
mysearch:undefined,
|
|
|
|
|
});
|
|
|
|
|
var currenturl = this.props.location.pathname;
|
|
|
|
|
var newUrl = (currenturl.split("?"))[0];
|
|
|
|
|
window.history.pushState('','',newUrl);
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
let {yslGuideone} =this.state;
|
|
|
|
|
let {yslGuideone,mysearch} =this.state;
|
|
|
|
|
// console.log("98");
|
|
|
|
|
// console.log(yslGuideone);
|
|
|
|
|
// console.log(this.props.isAdmin());
|
|
|
|
|
// // var yslGuideones = window.sessionStorage.getItem('yslGuideone');
|
|
|
|
|
// console.log(this.props);
|
|
|
|
|
// console.log(this.props.location.search);
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<div className="newMain clearfix">
|
|
|
|
|
{/*头部banner*/}
|
|
|
|
|
<CoursesBanner {...this.props}></CoursesBanner>
|
|
|
|
|
|
|
|
|
|
{/*{yslGuideone===null||yslGuideone===undefined||yslGuideone===false?*/}
|
|
|
|
|
{/* (*/}
|
|
|
|
|
{/* this.props.isAdmin()===true?*/}
|
|
|
|
|
{/* <Guide*/}
|
|
|
|
|
{/* setwindowlocal={(b)=>this.setwindowlocal(b)}*/}
|
|
|
|
|
{/* >*/}
|
|
|
|
|
{/* </Guide>*/}
|
|
|
|
|
{/* :""*/}
|
|
|
|
|
{/* )*/}
|
|
|
|
|
{/* :""*/}
|
|
|
|
|
{/*}*/}
|
|
|
|
|
|
|
|
|
|
{mysearch!==undefined?
|
|
|
|
|
(
|
|
|
|
|
mysearch===true?
|
|
|
|
|
<Guide
|
|
|
|
|
setwindowlocal={(b)=>this.setwindowlocal(b)}
|
|
|
|
|
>
|
|
|
|
|
</Guide>
|
|
|
|
|
:""
|
|
|
|
|
)
|
|
|
|
|
:""
|
|
|
|
|
}
|
|
|
|
|
<div className="educontent clearfix" style={{flex: "1 0 auto"}}>
|
|
|
|
|
|
|
|
|
|
<div className="stud-class-set">
|
|
|
|
|