|
@@ -125,7 +125,8 @@
|
|
|
<a-form-item label="广告组名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
|
<a-input v-model="pane.tab" readOnly></a-input>
|
|
|
</a-form-item>
|
|
|
- <a-form-item label="素材类型" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="JSON.parse(pane.sceneId).indexOf(1)>0||JSON.parse(pane.sceneId).indexOf(3)>0||JSON.parse(pane.sceneId).indexOf(6)>0">
|
|
|
+
|
|
|
+ <a-form-item label="素材类型" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="pane.sceneId.indexOf(1)>=0||pane.sceneId.indexOf(3)>=0||pane.sceneId.indexOf(6)>=0">
|
|
|
<a-radio-group buttonStyle="solid" v-decorator="['creativeMaterialType', { initialValue: '1' }]" @change="changeType(bestIndex)">
|
|
|
<a-radio-button value="1">竖版视频</a-radio-button>
|
|
|
<a-radio-button value="2">横版视频</a-radio-button>
|
|
@@ -136,7 +137,7 @@
|
|
|
<!-- <a-form-item label="素材同步" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
|
|
|
|
</a-form-item> -->
|
|
|
- <a-form-item label="创意内容" :labelCol="labelCol" v-if="JSON.parse(pane.sceneId).indexOf(1)>=0||JSON.parse(pane.sceneId).indexOf(3)>=0||JSON.parse(pane.sceneId).indexOf(6)>=0">
|
|
|
+ <a-form-item label="创意内容" :labelCol="labelCol" v-if="pane.sceneId.indexOf(1)>=0||pane.sceneId.indexOf(3)>=0||pane.sceneId.indexOf(6)>=0">
|
|
|
<a-layout>
|
|
|
<a-layout-content style="padding:10px;">
|
|
|
|
|
@@ -213,7 +214,7 @@
|
|
|
</a-layout>
|
|
|
</a-form-item>
|
|
|
|
|
|
- <a-form-item label="便利贴广告" :labelCol="labelCol" v-if="JSON.parse(pane.sceneId).indexOf(7)>=0">
|
|
|
+ <a-form-item label="便利贴广告" :labelCol="labelCol" v-if="pane.sceneId.indexOf(7)>=0">
|
|
|
<a-layout>
|
|
|
<a-layout-content style="padding:10px;">
|
|
|
|
|
@@ -240,7 +241,7 @@
|
|
|
</div>
|
|
|
<a-form-item label="">
|
|
|
<a @click="getVideoList('image', index, item, bestIndex)">选择封面</a>
|
|
|
- <a @click="uploadImages(index,bestIndex,item)" style="margin-left:10px">上传封面</a>
|
|
|
+ <a @click="uploadImages(index,bestIndex,item,'postAdList')" style="margin-left:10px">上传封面</a>
|
|
|
<a @click="showImages(index,bestIndex)" v-if="item.chouzhenShow"
|
|
|
style="margin-left:10px">推荐封面</a>
|
|
|
<br />
|
|
@@ -267,7 +268,7 @@
|
|
|
@click="getChange(item, itemTag, index)">{{itemTag.name}}</a-tag>
|
|
|
</a-form-item>
|
|
|
|
|
|
- <a-form-item label="创意标题">
|
|
|
+ <a-form-item label="短广告语">
|
|
|
<a-textarea class="rending" placeholder="请输入短广告语" v-model.trim="item.shortSlogan"
|
|
|
:autosize="{ minRows: 2, maxRows: 6 }" :maxLength="8"></a-textarea>
|
|
|
<span v-if="item.shortSlogan.length>8" style="color:red">短广告语长度不能超过30个字符</span>
|
|
@@ -739,7 +740,8 @@
|
|
|
messageTip: null,
|
|
|
verticalPhoto:[],
|
|
|
horizontalPhoto:[],
|
|
|
- creativeMaterialType:'1'
|
|
|
+ creativeMaterialType:'1',
|
|
|
+ postAdTrue:false,
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -1278,17 +1280,17 @@
|
|
|
}
|
|
|
console.log(params)
|
|
|
this.loading = false
|
|
|
- // postAction('/kuaishou/batch/createCreative', params).then(res => {
|
|
|
- // if (res.success) {
|
|
|
- // this.visible = true
|
|
|
- // this.allForm.fail = res.result.fail
|
|
|
- // this.allForm.success = res.result.success
|
|
|
- // this.loading = false
|
|
|
- // } else {
|
|
|
- // this.loading = false
|
|
|
- // this.$message.error(res.message)
|
|
|
- // }
|
|
|
- // })
|
|
|
+ postAction('/kuaishou/batch/createCreative', params).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.visible = true
|
|
|
+ this.allForm.fail = res.result.fail
|
|
|
+ this.allForm.success = res.result.success
|
|
|
+ this.loading = false
|
|
|
+ } else {
|
|
|
+ this.loading = false
|
|
|
+ this.$message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -1422,12 +1424,18 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- uploadImages(index, bestIndex,item) {
|
|
|
+ uploadImages(index, bestIndex,item,type) {
|
|
|
+
|
|
|
nowIndex = index
|
|
|
bestIndex = bestIndex
|
|
|
this.addImageVisible = true
|
|
|
this.loadingImage = false
|
|
|
this.creativeMaterialType = item.creativeMaterialType
|
|
|
+ if(type){
|
|
|
+ this.postAdTrue = true
|
|
|
+ }else{
|
|
|
+ this.postAdTrue = false
|
|
|
+ }
|
|
|
},
|
|
|
closeImage() {
|
|
|
this.addImageVisible = false
|
|
@@ -1459,15 +1467,28 @@
|
|
|
}
|
|
|
postAction("/kusiShouUpload/image", params).then(res => {
|
|
|
if (res.success) {
|
|
|
- if (res.result.length + this.contentAll > 15) {
|
|
|
- this.$message.error('当前上传封面' + res.result.length + '张,最多可上传' + (15 - this.contentAll) + '张')
|
|
|
- this.loadingImage = false
|
|
|
- return
|
|
|
- } else {
|
|
|
- this.pans[bestIndex].list[nowIndex].imageList.push(...res.result)
|
|
|
- this.closeImage()
|
|
|
- this.loadingImage = false
|
|
|
+ if(!this.postAdTrue){
|
|
|
+ if (res.result.length + this.contentAll > 15) {
|
|
|
+ this.$message.error('当前上传封面' + res.result.length + '张,最多可上传' + (15 - this.contentAll) + '张')
|
|
|
+ this.loadingImage = false
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ this.pans[bestIndex].list[nowIndex].imageList.push(...res.result)
|
|
|
+ this.closeImage()
|
|
|
+ this.loadingImage = false
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if (res.result.length + this.contentAll > 15) {
|
|
|
+ this.$message.error('当前上传封面' + res.result.length + '张,最多可上传' + (15 - this.contentAll) + '张')
|
|
|
+ this.loadingImage = false
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ this.pans[bestIndex].postAdList[nowIndex].imageList.push(...res.result)
|
|
|
+ this.closeImage()
|
|
|
+ this.loadingImage = false
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
|
|
|
} else {
|
|
|
this.$message.error('封面上传失败')
|
|
@@ -1866,10 +1887,13 @@
|
|
|
return {
|
|
|
...item,
|
|
|
list: [],
|
|
|
- postAdList:[]
|
|
|
+ postAdList:[],
|
|
|
+ sceneId:JSON.parse(item.sceneId).map(item=>{
|
|
|
+ return parseInt(item)
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
- this.sceneIdValue = (JSON.parse(this.pans[0].sceneId).indexOf(1)>0||JSON.parse(this.pans[0].sceneId).indexOf(3)>0||JSON.parse(this.pans[0].sceneId).indexOf(6)>0)?'1':'4'
|
|
|
+ console.log(this.pans)
|
|
|
this.pansKey = this.pans[0].key
|
|
|
setTimeout(() => {
|
|
|
this.addCreative(0)
|