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

@ -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) {

@ -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)=>{

Loading…
Cancel
Save