|
|
|
@ -34,8 +34,6 @@ class Addcourses extends Component{
|
|
|
|
|
this.setState({
|
|
|
|
|
Addcoursestypes: true
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return response;
|
|
|
|
|
}, (error) => {
|
|
|
|
@ -49,6 +47,16 @@ class Addcourses extends Component{
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
componentDidUpdate = (prevProps) => {
|
|
|
|
|
console.log(prevProps);
|
|
|
|
|
console.log(this.props);
|
|
|
|
|
if(prevProps.occupation!==this.props.occupation){
|
|
|
|
|
this.setState({
|
|
|
|
|
Addcoursestype:false,
|
|
|
|
|
Addcoursestypes:false,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
openNotification = (messge) => {
|
|
|
|
|
notification.open({
|
|
|
|
|
message: "提示",
|
|
|
|
@ -233,24 +241,26 @@ class Addcourses extends Component{
|
|
|
|
|
Addcoursestype:false,
|
|
|
|
|
isSpin:false
|
|
|
|
|
});
|
|
|
|
|
try {
|
|
|
|
|
// try {
|
|
|
|
|
if(response.data.message==="该课堂要求成员完成实名认证"){
|
|
|
|
|
this.props.HideAddcoursestypess(1);
|
|
|
|
|
this.props.HideAddcoursestypess(1);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(response.data.message==="该课堂要求成员完成职业认证"){
|
|
|
|
|
this.props.HideAddcoursestypess(2);
|
|
|
|
|
|
|
|
|
|
this.props.HideAddcoursestypess(2);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(response.data.message==="该课堂要求成员完成实名和职业认证"){
|
|
|
|
|
this.props.HideAddcoursestypess(3);
|
|
|
|
|
this.props.HideAddcoursestypess(3);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}catch (e) {
|
|
|
|
|
// }catch (e) {
|
|
|
|
|
notification.open({
|
|
|
|
|
message:"提示",
|
|
|
|
|
description:response.data.message
|
|
|
|
|
});
|
|
|
|
|
// this.props.showNotification(response.data.message);
|
|
|
|
|
}
|
|
|
|
|
// // this.props.showNotification(response.data.message);
|
|
|
|
|
// }
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(response.data.status===0){
|
|
|
|
@ -316,6 +326,8 @@ class Addcourses extends Component{
|
|
|
|
|
Addcoursestypes
|
|
|
|
|
}=this.state;
|
|
|
|
|
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
|
|
|
|
|
console.log("Addcourses");
|
|
|
|
|
console.log(Addcoursestypes)
|
|
|
|
|
return(
|
|
|
|
|
<div>
|
|
|
|
|
<Modals
|
|
|
|
|