diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index e1d5da561..98571d818 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -21,16 +21,16 @@ let hashTimeout // 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) { initOnlineOfflineListener() diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index ae7d781e9..b15518a4f 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -524,7 +524,7 @@ class LoginDialog extends Component { if (isRender === undefined) { isRender = false } - + console.log(this.props) return ( <Dialog open={true} id="DialogID" style={{ display: isRender==false? 'none' : ''}} @@ -638,7 +638,7 @@ class LoginDialog extends Component { frameBorder="0" sandbox="allow-scripts allow-same-origin allow-top-navigation" scrolling="no" - src="https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&response_type=code&scope=snsapi_login#wechat_redirect"></iframe>:""} + src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login#wechat_redirect`}></iframe>:""} {weixinlogin===true?<p className="clearfix"> <a className={"startlogin color-blue"} onClick={()=>this.hideweixinlogin()}>返回账号登录</a> </p>:""} diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index fedc3cb22..978682e0b 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -1192,7 +1192,7 @@ class LoginRegisterComponent extends Component { frameBorder="0" sandbox="allow-scripts allow-same-origin allow-top-navigation" scrolling="no" - src="https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&response_type=code&scope=snsapi_login#wechat_redirect"></iframe>:""} + src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login#wechat_redirect`}></iframe>:""} {weixinlogin===true?<p className="clearfix mb20 textcenter"> <a className={"startlogin color-blue"} onClick={()=>this.hideweixinlogin()}>返回登录注册</a> </p>:""}