|
@@ -81,7 +81,11 @@ const NewDetailForm = Form.create()(React.createClass({
|
|
|
}else{
|
|
|
message.warning('请上传视频文件!');
|
|
|
return false;
|
|
|
- }
|
|
|
+ };
|
|
|
+ if(!theVideoUrl.length){
|
|
|
+ message.warning('请上传视频文件!');
|
|
|
+ return false;
|
|
|
+ };
|
|
|
if (!this.state.videoImg.length) {
|
|
|
message.warning('请上传视频封面图片!');
|
|
|
return false;
|
|
@@ -132,7 +136,7 @@ const NewDetailForm = Form.create()(React.createClass({
|
|
|
} else {
|
|
|
this.state.data = {};
|
|
|
this.state.videoImg = [];
|
|
|
- this.state.videoUrl=[];
|
|
|
+ this.state.fileList=[];
|
|
|
};
|
|
|
},
|
|
|
componentWillReceiveProps(nextProps) {
|
|
@@ -143,7 +147,7 @@ const NewDetailForm = Form.create()(React.createClass({
|
|
|
this.state.data = {};
|
|
|
this.state.videoImg = [];
|
|
|
this.state.theData={};
|
|
|
- this.state.videoUrl=[];
|
|
|
+ this.state.fileList=[];
|
|
|
};
|
|
|
this.props.form.resetFields();
|
|
|
};
|
|
@@ -203,7 +207,6 @@ const NewDetailForm = Form.create()(React.createClass({
|
|
|
wrapperCol: { span: 12 },
|
|
|
};
|
|
|
const fileList= this.state.fileList||[];
|
|
|
- console.log(fileList)
|
|
|
return (
|
|
|
<div className='login'>
|
|
|
<Form layout="horizontal" onSubmit={(e)=>{this.handleSubmit(e,0)}} id="demand-form">
|