diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 939d2cdaa..2fbee86da 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) { diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js index d90feed0f..edd7e554a 100644 --- a/public/react/src/modules/user/usersInfo/InfosTopics.js +++ b/public/react/src/modules/user/usersInfo/InfosTopics.js @@ -70,20 +70,22 @@ class InfosTopics extends Component{ // }else{ // // } - this.setState({ - isSpin:true - }) - let types=this.props.match.params.topicstype; - let user_id=""; + this.setState({ + isSpin:true + }) + let types=this.props.match.params.topicstype; + let user_id=""; + + if(types==="publicly"){ + user_id=this.props.current_user&&this.props.current_user.login; + }else{ + user_id=this.props.match.params&&this.props.match.params.username; + } - if(types==="publicly"){ - user_id=this.props.current_user&&this.props.current_user.login; - }else{ - user_id=this.props.match.params&&this.props.match.params.username; - } - if(user_id!=undefined){ - console.log(user_id) + if(user_id===undefined){ + user_id=this.props.match.params&&this.props.match.params.username; + } let {per_page}=this.state; let url=`/users/${user_id}/question_banks.json`; @@ -107,11 +109,7 @@ class InfosTopics extends Component{ isSpin:false }) }); - }else{ - this.setState({ - isSpin:false - }) - } + } searchCategory=(type)=>{