diff --git a/src/App.js b/src/App.js index bb342cd1..6b1991f1 100644 --- a/src/App.js +++ b/src/App.js @@ -190,7 +190,6 @@ class App extends Component { this.unlisten = this.props.history.listen((location,history) => { // if(login && ) let newPathname = location.pathname.split('/')[1]; - console.log("---------------newpathname:",newPathname); if (this.state.pathName !== newPathname) { newPathname && this.getPathnameType(newPathname); } diff --git a/src/AppConfig.js b/src/AppConfig.js index 9ca6363a..cf7fe8b6 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -25,7 +25,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : window.location.search.indexOf('debug=s') !== -1 ? 'student' : - window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || '' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin' } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/src/forge/Settings/Setting.js b/src/forge/Settings/Setting.js index 04b29cca..a4daa108 100644 --- a/src/forge/Settings/Setting.js +++ b/src/forge/Settings/Setting.js @@ -145,17 +145,18 @@ class Setting extends Component { this.setState({ loading:true }) - const { projectsId , owner } = this.props.match.params; - const navUrl = `/${owner}/${projectsId}/project_units.json`; + this.update(values); + // const { projectsId , owner } = this.props.match.params; + // const navUrl = `/${owner}/${projectsId}/project_units.json`; - let unit = values.project_units.filter(item => (item !== "home" && item!== "activity" && item!== "code")); - axios.post(navUrl, { - unit_types:unit - }).then((result) => { - if (result) { - this.update(values); - } - }).catch(error=>{}) + // let unit = values.project_units.filter(item => (item !== "home" && item!== "activity" && item!== "code")); + // axios.post(navUrl, { + // unit_types:unit + // }).then((result) => { + // if (result) { + // this.update(values); + // } + // }).catch(error=>{}) } }); }; diff --git a/src/modules/tpm/TPMIndexHOC.js b/src/modules/tpm/TPMIndexHOC.js index 8ffacccf..2ae28950 100644 --- a/src/modules/tpm/TPMIndexHOC.js +++ b/src/modules/tpm/TPMIndexHOC.js @@ -213,9 +213,9 @@ export function TPMIndexHOC(WrappedComponent) { // 如果处于登录状态,且刚刚打开,那么跳到个人主页 // let hrefStr = this.props.match.path === "/login" || this.props.match.path === "/register" || this.props.match.path === "/resetPassword"; // console.log("111:",hrefStr,this.props.match.path); - // if((this.props.match.path === "/" && this.props.history.length===2)){ - // this.props.history.push(`/${response.data.login}`) - // } + if(this.props.match.path === "/"){ + this.props.history.push(`/${response.data.login}`) + } if(!response.data.phone){ var supplyCookie = cookie.load('supplyphone'); this.setState({