修改新建课堂新开页 goback 无效

topic_bank
杨树林 6 years ago
parent 47a51ea60f
commit 443e427a7e

@ -335,11 +335,19 @@ class CoursesNew extends Component {
// this.props.history.push(this.props.current_user.first_category_url);
// }
// window.history.go(-1)
try {
if(id===undefined){
this.props.history.goBack()
this.props.history.push("/");
}else{
if(this.props.current_user.first_category_url===undefined){
this.props.history.push("/");
}else{
this.props.history.push(this.props.current_user.first_category_url);
}
}
}catch (e) {
this.props.history.push("/");
}
}

Loading…
Cancel
Save