杨树明 5 years ago
parent d952ee8d4d
commit 50b88c293f

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

Loading…
Cancel
Save