|
|
@ -275,12 +275,13 @@ class Addcourses extends Component{
|
|
|
|
});
|
|
|
|
});
|
|
|
|
if(response.data.course_id!=undefined){
|
|
|
|
if(response.data.course_id!=undefined){
|
|
|
|
this.submitasyn(response.data.course_id)
|
|
|
|
this.submitasyn(response.data.course_id)
|
|
|
|
}else{
|
|
|
|
|
|
|
|
// 无返回课程id则是选择的教师或者助教身份,成功后跳转到课堂首页
|
|
|
|
|
|
|
|
// console.log(this.props);
|
|
|
|
|
|
|
|
// console.log(this.props.history.push);
|
|
|
|
|
|
|
|
window.location.href="/courses";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// else{
|
|
|
|
|
|
|
|
// // 无返回课程id则是选择的教师或者助教身份,成功后跳转到课堂首页
|
|
|
|
|
|
|
|
// // console.log(this.props);
|
|
|
|
|
|
|
|
// // console.log(this.props.history.push);
|
|
|
|
|
|
|
|
// window.location.href="/courses";
|
|
|
|
|
|
|
|
// }
|
|
|
|
if(Addcoursestype===true){
|
|
|
|
if(Addcoursestype===true){
|
|
|
|
this.props.hideAddcoursestype();
|
|
|
|
this.props.hideAddcoursestype();
|
|
|
|
}
|
|
|
|
}
|
|
|
|