From f511e85d38658e3d48f2c84eb7814d4066889c22 Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Thu, 2 Apr 2020 17:14:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.js | 2 +- src/AppConfig.js | 3 +-- src/modules/tpm/NewHeader.js | 2 +- src/modules/tpm/TPMIndexHOC.js | 42 +++++++++++++++++----------------- 4 files changed, 24 insertions(+), 25 deletions(-) diff --git a/src/App.js b/src/App.js index 0ea1aed6..c67fac72 100644 --- a/src/App.js +++ b/src/App.js @@ -481,7 +481,7 @@ class App extends Component { this.setState({ mygetHelmetapi: undefined }); - document.title = "Forge"; + // document.title = "Forge"; var link = document.createElement('link'), oldLink = document.getElementById('dynamic-favicon'); link.id = 'dynamic-favicon'; diff --git a/src/AppConfig.js b/src/AppConfig.js index 4fa0e7dc..fcbd188e 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -322,8 +322,7 @@ export function initAxiosInterceptors(props) { // console.log("401401401") // } if (response.data.status === 403||response.data.status === "403") { - - locationurl('/403'); + locationurl('/403'); } if (response.data.status === 404) { diff --git a/src/modules/tpm/NewHeader.js b/src/modules/tpm/NewHeader.js index 4f8567b9..8cce393d 100644 --- a/src/modules/tpm/NewHeader.js +++ b/src/modules/tpm/NewHeader.js @@ -691,7 +691,7 @@ submittojoinclass=(value)=>{ this.setState({ mygetHelmetapi2: undefined }); - document.title = "Forge"; + // document.title = "Forge"; var link = document.createElement('link'), oldLink = document.getElementById('dynamic-favicon'); link.id = 'dynamic-favicon'; diff --git a/src/modules/tpm/TPMIndexHOC.js b/src/modules/tpm/TPMIndexHOC.js index 2ff44606..2c17791e 100644 --- a/src/modules/tpm/TPMIndexHOC.js +++ b/src/modules/tpm/TPMIndexHOC.js @@ -1,18 +1,18 @@ import React, { Component } from 'react'; -import PropTypes from 'prop-types'; +// import PropTypes from 'prop-types'; import NewHeader from './NewHeader' import NewFooter from './NewFooter' import SiderBar from './SiderBar' -import { getUrl, downloadFile } from 'educoder' +import { downloadFile } from 'educoder' import axios from 'axios'; import { Spin } from 'antd'; import './TPMIndex.css'; import LoginDialog from '../login/LoginDialog'; import AccountProfile from '../user/AccountProfile'; import AccountPhoneemail from '../user/AccountPhoneemail'; -import Trialapplication from "../login/Trialapplication"; +// import Trialapplication from "../login/Trialapplication"; // import "antd/dist/antd.css"; // import '../../css/educoder/edu-common.css' // import '../../css/educoder/edu-all.css' @@ -128,24 +128,24 @@ export function TPMIndexHOC(WrappedComponent) { componentDidMount() { // console.log("TPMIndexHOC========"); - // console.log(this.props); - window.addEventListener('keyup', this.keyupListener) + // console.log("match",this.props); + window.addEventListener('keyup', this.keyupListener); - if(this.props.match.path==="/"){ - // document.title="创新源于实践"; - }else if(this.props.match.path==="/403"){ - document.title="你没有权限访问"; - }else if(this.props.match.path==="/nopage"){ - document.title="没有找到该页面"; - }else if(this.props.match.path==="/shixuns"){ - document.title="实训项目"; - }else if(this.props.match.path==="/paths"){ - document.title="实践课程"; - }else if(this.props.match.path==="/courses"){ - document.title="翻转课堂"; - }else if(this.props.match.path==="/projects"){ - document.title="开源项目"; - } + if(this.props.match.path==="/"){ + document.title="Forge"; + }else if(this.props.match.path==="/403"){ + document.title="你没有权限访问"; + }else if(this.props.match.path==="/nopage"){ + document.title="没有找到该页面"; + }else if(this.props.match.path==="/shixuns"){ + document.title="实训项目"; + }else if(this.props.match.path==="/paths"){ + document.title="实践课程"; + }else if(this.props.match.path==="/courses"){ + document.title="翻转课堂"; + }else if(this.props.match.path==="/projects"){ + document.title="开源项目"; + } $.ajaxSetup({ cache: true @@ -264,7 +264,7 @@ export function TPMIndexHOC(WrappedComponent) { this.setState({ mygetHelmetapi: undefined }); - document.title = "Forge"; + // document.title = "Forge"; var link = document.createElement('link'), oldLink = document.getElementById('dynamic-favicon'); link.id = 'dynamic-favicon';