diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 543c71c69..d8e88ae48 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -68,7 +68,7 @@ class NewHeader extends Component { mydisplay:false, headtypesonClickbool:false, headtypess:"/", - mygetHelmetapi2:undefined, + mygetHelmetapi2: null, } console.log("176") // console.log(props); @@ -110,7 +110,11 @@ class NewHeader extends Component { }); //获取游览器地址 - window.sessionStorage.setItem("yslgeturls",JSON.stringify(window.location.href)) + try { + window.sessionStorage.setItem("yslgeturls", JSON.stringify(window.location.href)) + } catch (e) { + + } // axios.interceptors.response.use((response) => { // if (response != undefined) // if (response && response.data.status === -1) { @@ -676,6 +680,9 @@ submittojoinclass=(value)=>{ } document.head.appendChild(link); }else { + this.setState({ + mygetHelmetapi2: undefined + }); document.title = "EduCoder"; var link = document.createElement('link'), oldLink = document.getElementById('dynamic-favicon'); @@ -689,6 +696,9 @@ submittojoinclass=(value)=>{ } }else{ + this.setState({ + mygetHelmetapi2: undefined + }); document.title = "EduCoder"; var link = document.createElement('link'), oldLink = document.getElementById('dynamic-favicon'); @@ -704,7 +714,9 @@ submittojoinclass=(value)=>{ }).catch((error) => { console.log("开始刷新定制数据了但报错了"); console.log(error); - + this.setState({ + mygetHelmetapi2: undefined + }); document.title = "EduCoder"; var link = document.createElement('link'), oldLink = document.getElementById('dynamic-favicon'); @@ -875,10 +887,13 @@ submittojoinclass=(value)=>{ />:""} this.headtypesonClick("/",false)} className={"fl mr30 ml25 mt10"}> { - mygetHelmetapi2===undefined||mygetHelmetapi2.nav_logo_url===null||mygetHelmetapi2.nav_logo_url===undefined? - 高校智能化教学与实训平台 - : - 高校智能化教学与实训平台 + mygetHelmetapi2 === null ? + "" + : + mygetHelmetapi2===undefined||mygetHelmetapi2.nav_logo_url===null||mygetHelmetapi2.nav_logo_url===undefined? + 高校智能化教学与实训平台 + : + 高校智能化教学与实训平台 } @@ -894,209 +909,211 @@ submittojoinclass=(value)=>{ } { - mygetHelmetapi2!==undefined&&mygetHelmetapi2.navbar!==null&&mygetHelmetapi2.navbar!==undefined&&mygetHelmetapi2.navbar.length>0? -
- +
+ // :mygetHelmetapi2===undefined||mygetHelmetapi2.navbar===null||mygetHelmetapi2.navbar===undefined||mygetHelmetapi2.navbar.length===0? + //
+ // + // + //
+ : +
+ + +
}