From e523282877aa004a9a46ecd216ca6595e4b4df6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 2 Aug 2019 15:38:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 20 ++++++------ public/react/src/modules/login/LoginDialog.js | 32 +++++++++---------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 97cfa8eeb..d97c7a223 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -20,16 +20,16 @@ function locationurl(list){ // TODO 开发期多个身份切换 let debugType ="" -if (isDev) { - const _search = window.location.search; - let parsed = {}; - if (_search) { - parsed = queryString.parse(_search); - } - 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 || 'admin' -} +// if (isDev) { +// const _search = window.location.search; +// let parsed = {}; +// if (_search) { +// parsed = queryString.parse(_search); +// } +// 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 || 'admin' +// } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index 58cd9b7fb..3bc77c52e 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -398,23 +398,23 @@ class LoginDialog extends Component { }); } handleDialogClose = () => { - // if(this.props.match===undefined){ - // window.location.href="/"; - // }else if(this.props.match.path==="/"){ - // this.setState({ - // isRender: false - // }) - // }else{ - // window.location.href="/"; - // } - this.setState({ - isRender: false - }) - try { - this.props.Modifyloginvalue(); - }catch (e) { - + + if(this.props.match===undefined){ + window.location.href="/"; + }else{ + this.setState({ + isRender: false + }) + this.props.Modifyloginvalue(); } + // this.setState({ + // isRender: false + // }) + // try { + // this.props.Modifyloginvalue(); + // }catch (e) { + // + // } } loginEDU=()=>{