From ae22ebeeeb66d2fc55fe5c76899fb1d5237eadc2 Mon Sep 17 00:00:00 2001 From: harry Date: Tue, 24 Mar 2020 17:15:25 +0800 Subject: [PATCH] fix --- public/react/src/modules/tpm/NewHeader.js | 86 ++--------------------- 1 file changed, 6 insertions(+), 80 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 2018ccd52..469a821ce 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -16,9 +16,6 @@ import LoginDialog from '../login/LoginDialog'; import GotoQQgroup from '../../modal/GotoQQgroup' -import './TPMIndex.css'; - - const $ = window.$ // TODO 这部分脚本从公共脚本中直接调用 @@ -505,9 +502,8 @@ class NewHeader extends Component { this.setState({ isRender: true }) - + return; } - } if (user && user.profile_completed === false) { this.setState({ @@ -516,13 +512,6 @@ class NewHeader extends Component { return; } - onKeywordSearchKeyDowns = () => { - this.setState( - { - setevaluatinghides: false - } - ) - } if (type === "newshixuns") { if (this.props && this.props.current_user && this.props.current_user.is_shixun_marker === false) { @@ -531,89 +520,23 @@ class NewHeader extends Component { } } - if (type === "projects") { - if (this.props.user && this.props.user.email === undefined || this.props.user && this.props.user.email === null || this.props.user && this.props.user.email === "") { - this.openNotification("请先绑定邮箱,谢谢"); - return - } - } - let { user } = this.state; - if (user === undefined) { - this.setState({ - isRender: true - }) - return - } - if (user && user.login === "") { - this.setState({ - isRender: true - }) - return; - } - if (user && user.profile_completed === false) { - this.setState({ - AccountProfiletype: true - }) - return; - } - if (type === "newshixuns") { - if (this.props && this.props.current_user && this.props.current_user.is_shixun_marker === false) { - this.setgoshowqqgtounp(true); - return; - } - } - if (url !== undefined || url !== "") { window.location.href = url; } - } - //修改登录方法 - Modifyloginvalue = () => { - this.setState({ - isRender: false, - }) - } - hideAccountProfile = () => { - this.setState({ - AccountProfiletype: false - }) - }; - headtypesonClick = (url, bool) => { - this.setState({ - headtypess: url, - headtypesonClickbool: bool, - }) } - //获取数据为空的时候 - gettablogourlnull = () => { - this.setState({ - mygetHelmetapi2: undefined - }); - document.title = "EduCoder"; - var link = document.createElement('link'), - oldLink = document.getElementById('dynamic-favicon'); - link.id = 'dynamic-favicon'; - link.rel = 'shortcut icon'; - link.href = "/react/build/./favicon.ico"; - if (oldLink) { - document.head.removeChild(oldLink); - } - document.head.appendChild(link); - }; //修改登录方法 Modifyloginvalue = () => { this.setState({ isRender: false, }) - } hideAccountProfile = () => { @@ -817,6 +740,9 @@ class NewHeader extends Component { if (mygetHelmetapi2) { if (mygetHelmetapi2.navbar) { if (mygetHelmetapi2.navbar.length > 0) { + // console.log("mygetHelmetapi2.navbar.length>0====-=-=--=-=-=-="); + // + // console.log(match.path); if (match.path === '/') { if (headtypesonClickbool === false) { headtypes = undefined; @@ -929,7 +855,7 @@ class NewHeader extends Component { "" } - this.headtypesonClick("/", false)} className={"fl mr30 ml25 mt10"}> + this.headtypesonClick("/", false)} className={"fl mr30 ml25 mt10"}> { mygetHelmetapi2 === null ? "" @@ -939,7 +865,7 @@ class NewHeader extends Component { : 高校智能化教学与实训平台 } - +