courseware
杨树林 5 years ago
parent 7e31f73ff2
commit 5b5c3c20c7

@ -213,25 +213,17 @@ class sendResources extends Component{
} }
// console.log("description");
// console.log(description);
if(description===undefined||description===null){
}else { if(description===undefined){
if(description.length>100){
this.setState({
descriptiontype:true
})
return
}
}else if(description.length>100){
this.setState({
descriptiontype:true
})
return
} }
if(this.props.Exterchainname==="资源设置"){ if(this.props.Exterchainname==="资源设置"){
//设置 //设置
let coursesId=this.props.match.params.coursesId; let coursesId=this.props.match.params.coursesId;
@ -248,17 +240,13 @@ class sendResources extends Component{
description:description, description:description,
delay_publish:Radiovalue, delay_publish:Radiovalue,
}).then((result)=>{ }).then((result)=>{
if(result){ if(result.data.status===0){
if(result.data){ this.ModalCancelModalCancel();
if(result.data.status===0){ this.props.updataleftNavfun();
this.ModalCancelModalCancel(); this.props.showNotification("设置资源成功");
this.props.updataleftNavfun(); this.props.setupdate(1,false)
this.props.showNotification("设置资源成功"); }else{
this.props.setupdate(1,false) this.props.showNotification(result.data.message);
}else{
this.props.showNotification(result.data.message);
}
}
} }
}) })
@ -278,20 +266,22 @@ class sendResources extends Component{
description:description, description:description,
delay_publish:Radiovalue, delay_publish:Radiovalue,
}).then((result)=>{ }).then((result)=>{
if(result){
if(result.data){
if(result.data.status===0){ if(result.data.status===0){
this.ModalCancelModalCancel(); this.ModalCancelModalCancel();
this.props.updataleftNavfun(); this.props.updataleftNavfun();
this.props.showNotification("上传资源成功"); this.props.showNotification("上传资源成功");
this.props.setupdate(1,false) this.props.setupdate(1,false)
}else{ }else{
this.props.showNotification(result.data.message); this.props.showNotification(result.data.message);
}
}
} }
}) })
} }
} }
settextarea=(e)=>{ settextarea=(e)=>{

Loading…
Cancel
Save