|
@@ -14,6 +14,7 @@ import {
|
|
|
import { videoType } from '@/dataDic.js';
|
|
|
import { getVideoType} from '@/tools.js';
|
|
|
import VideoComponent from '@/crop/video';
|
|
|
+import Crop from '@/crop/cropBlock';
|
|
|
|
|
|
const NewDetailForm = Form.create()(React.createClass({
|
|
|
getInitialState() {
|
|
@@ -22,7 +23,7 @@ const NewDetailForm = Form.create()(React.createClass({
|
|
|
loading: false,
|
|
|
auditStatus: 0,
|
|
|
textFileList: [],
|
|
|
- pictureUrl: [],
|
|
|
+ videoImg: [],
|
|
|
vedioUrl:[]
|
|
|
};
|
|
|
},
|
|
@@ -52,7 +53,7 @@ const NewDetailForm = Form.create()(React.createClass({
|
|
|
data: thisData,
|
|
|
auditStatus:thisData.auditStatus,
|
|
|
videoUrl:[],
|
|
|
- pictureUrl: thisData.titleImg ? splitUrl(thisData.titleImg, ',', globalConfig.avatarHost + '/upload') : []
|
|
|
+ videoImg: thisData.titleImg ? splitUrl(thisData.titleImg, ',', globalConfig.avatarHost + '/upload') : []
|
|
|
});
|
|
|
}.bind(this),
|
|
|
}).always(function () {
|
|
@@ -100,8 +101,6 @@ const NewDetailForm = Form.create()(React.createClass({
|
|
|
keyword:values.keyword,
|
|
|
auditStatus:index,
|
|
|
summary: values.summary,
|
|
|
- province: (values.ProvinceCity)[0],
|
|
|
- publishPages:publishPages
|
|
|
}
|
|
|
}).done(function (data) {
|
|
|
this.setState({
|
|
@@ -130,7 +129,7 @@ const NewDetailForm = Form.create()(React.createClass({
|
|
|
this.loadData(this.props.data.id);
|
|
|
} else {
|
|
|
this.state.data = {};
|
|
|
- this.state.pictureUrl = [];
|
|
|
+ this.state.videoImg = [];
|
|
|
this.state.videoUrl=[];
|
|
|
};
|
|
|
},
|
|
@@ -140,7 +139,7 @@ const NewDetailForm = Form.create()(React.createClass({
|
|
|
this.loadData(nextProps.data.id);
|
|
|
} else {
|
|
|
this.state.data = {};
|
|
|
- this.state.pictureUrl = [];
|
|
|
+ this.state.videoImg = [];
|
|
|
this.state.theData={};
|
|
|
this.state.videoUrl=[];
|
|
|
};
|
|
@@ -196,16 +195,13 @@ const NewDetailForm = Form.create()(React.createClass({
|
|
|
/>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item" {...formItemLayout} label="封面图片">
|
|
|
- <VideoComponent
|
|
|
- fileList={this.getPictureUrl}
|
|
|
- videoUrl={this.state.pictureUrl}
|
|
|
- dataUrl={{
|
|
|
- url:'/api/user/demand/uploadPicture',
|
|
|
- keyWord:'demand_picture',
|
|
|
- type:'image',
|
|
|
- page:1
|
|
|
- }}
|
|
|
- visible={this.props.visible}
|
|
|
+ <Crop
|
|
|
+ getAllImg={(e)=>{this.setState({videoImg:e})}}
|
|
|
+ number = {1}
|
|
|
+ aspectRatio = {1/1}
|
|
|
+ url ={globalConfig.context + '/api/user/uploadPicture64'}
|
|
|
+ uploadData = {{sign:'user_picture'}}
|
|
|
+ urlArr = {this.state.videoImg}
|
|
|
/>
|
|
|
</FormItem>
|
|
|
</div>
|