dev_hss
杨树明 6 years ago
parent 38c309c216
commit 1d86e0f641

@ -21,16 +21,16 @@ let hashTimeout
// TODO 开发期多个身份切换 // TODO 开发期多个身份切换
let debugType ="" let debugType =""
if (isDev) { // if (isDev) {
const _search = window.location.search; // const _search = window.location.search;
let parsed = {}; // let parsed = {};
if (_search) { // if (_search) {
parsed = queryString.parse(_search); // parsed = queryString.parse(_search);
} // }
debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : // debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
window.location.search.indexOf('debug=s') != -1 ? 'student' : // window.location.search.indexOf('debug=s') != -1 ? 'student' :
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' // window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
} // }
window._debugType = debugType; window._debugType = debugType;
export function initAxiosInterceptors(props) { export function initAxiosInterceptors(props) {

@ -70,20 +70,22 @@ class InfosTopics extends Component{
// }else{ // }else{
// //
// } // }
this.setState({ this.setState({
isSpin:true isSpin:true
}) })
let types=this.props.match.params.topicstype; let types=this.props.match.params.topicstype;
let user_id=""; 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){ if(user_id===undefined){
console.log(user_id) user_id=this.props.match.params&&this.props.match.params.username;
}
let {per_page}=this.state; let {per_page}=this.state;
let url=`/users/${user_id}/question_banks.json`; let url=`/users/${user_id}/question_banks.json`;
@ -107,11 +109,7 @@ class InfosTopics extends Component{
isSpin:false isSpin:false
}) })
}); });
}else{
this.setState({
isSpin:false
})
}
} }
searchCategory=(type)=>{ searchCategory=(type)=>{

Loading…
Cancel
Save