调整报错

dev_hss
杨树明 5 years ago
parent 6a99dcd031
commit 78d7ad5f74

@ -84,36 +84,33 @@ class InfosTopics extends Component{
if(user_id===undefined){
user_id=this.props.match.params&&this.props.match.params.username;
user_id=1
}
if(user_id!=undefined){
let {per_page}=this.state;
let url=`/users/${user_id}/question_banks.json`;
axios.get(encodeURI(url),{params:{
type,
object_type:category,
course_list_id,
sort_by,
sort_direction,
page,
per_page
}
}).then((response) => {
this.setState({
data:response.data,
checkBoxValues:[],
isSpin:false
})
}).catch((error) => {
this.setState({
isSpin:false
})
});
}
let {per_page}=this.state;
let url=`/users/${user_id}/question_banks.json`;
axios.get(encodeURI(url),{params:{
type,
object_type:category,
course_list_id,
sort_by,
sort_direction,
page,
per_page
}
}).then((response) => {
this.setState({
data:response.data,
checkBoxValues:[],
isSpin:false
})
}).catch((error) => {
this.setState({
isSpin:false
})
});
}

Loading…
Cancel
Save