|
@@ -62,19 +62,24 @@
|
|
<!-- <upload-to-ali v-model="item.imageUrl" :customDomain="customDomain" preview :region="region"
|
|
<!-- <upload-to-ali v-model="item.imageUrl" :customDomain="customDomain" preview :region="region"
|
|
:bucket="bucket" :accept="acceptImage" :size="102400" :accessKeyId="accessKeyId"
|
|
:bucket="bucket" :accept="acceptImage" :size="102400" :accessKeyId="accessKeyId"
|
|
:accessKeySecret="accessKeySecret"></upload-to-ali> -->
|
|
:accessKeySecret="accessKeySecret"></upload-to-ali> -->
|
|
- <a @click="getImageList(item)" v-if="item.imageUrl==''">选择图片</a>
|
|
|
|
- <img :src="item.imageUrl" alt="" v-else style="width:120px">
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <a @click="getImageList(item)" >{{item.imageUrl==''?'选择图片':'更改图片'}}</a>
|
|
|
|
+ <br />
|
|
|
|
+ <img :src="item.imageUrl" alt="图片加载失败!" style="width:120px" v-if="item.imageUrl">
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
|
|
|
<a-form-item label="创意标题" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
|
<a-form-item label="创意标题" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
|
v-if="creativeType == 'customCreativity'">
|
|
v-if="creativeType == 'customCreativity'">
|
|
- <a-input v-model="item.text" style="width:400px" class="rending" @change="judge(item)"></a-input>
|
|
|
|
|
|
+ <a-input v-model="item.title " style="width:400px" class="rending" @change="judge($event,item)"></a-input>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
<a-form-item label="动态词包" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
|
<a-form-item label="动态词包" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
|
v-if="creativeType == 'customCreativity'">
|
|
v-if="creativeType == 'customCreativity'">
|
|
- <a-tag v-for="(itemTag,indexTag) of tags" :key="indexTag" v-show="indexTag<item.many"
|
|
|
|
|
|
+ <!-- {{tags}} -->
|
|
|
|
+ <!-- v-show="indexTag<item.many" -->
|
|
|
|
+ <a-tag v-for="(itemTag,indexTag) of tags" :key="indexTag" v-show="indexTag<item.many"
|
|
@click="getChange(item,itemTag,index)">{{itemTag.name}}</a-tag>
|
|
@click="getChange(item,itemTag,index)">{{itemTag.name}}</a-tag>
|
|
- <span @click="showElseClick(item)">{{item.showElse?"更多":"收起"}}</span>
|
|
|
|
|
|
+ <span @click="showElseClick(item)" class="moreTags">{{item.showElse?"更多":""}}</span>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
@@ -91,7 +96,7 @@
|
|
<a-button @click="addTitle" class="row-item">添加创意标题</a-button>
|
|
<a-button @click="addTitle" class="row-item">添加创意标题</a-button>
|
|
<br />
|
|
<br />
|
|
<div v-for="(item,index) of titleData" :key="index">
|
|
<div v-for="(item,index) of titleData" :key="index">
|
|
- <a-input style="width:55%;margin-bottom:20px" v-model="item.text" class="rending-all" @change="judge(item)">
|
|
|
|
|
|
+ <a-input style="width:55%;margin-bottom:20px" v-model="item.title" class="rending-all" @change="judge($event,item)">
|
|
</a-input>
|
|
</a-input>
|
|
<a-icon type="delete" style="margin-left:20px;cursor: pointer;" v-show="titleData.length>1"
|
|
<a-icon type="delete" style="margin-left:20px;cursor: pointer;" v-show="titleData.length>1"
|
|
@click="tetleDetele(index)" />
|
|
@click="tetleDetele(index)" />
|
|
@@ -321,6 +326,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
isImg:false,
|
|
isImg:false,
|
|
|
|
+ accountInfo:{},
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -328,7 +334,7 @@
|
|
console.log(this.isImg)
|
|
console.log(this.isImg)
|
|
this.ipagination.current = page
|
|
this.ipagination.current = page
|
|
var params = {}
|
|
var params = {}
|
|
- params.accountId = "1649600126891015"
|
|
|
|
|
|
+ params.accountId = this.accountInfo.value
|
|
params.pageSize = this.ipagination.pageSize
|
|
params.pageSize = this.ipagination.pageSize
|
|
params.pageNo = page
|
|
params.pageNo = page
|
|
if (this.time.length > 0) {
|
|
if (this.time.length > 0) {
|
|
@@ -338,9 +344,9 @@
|
|
if ((this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO' || this.materialType ==
|
|
if ((this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO' || this.materialType ==
|
|
'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL')&&!this.isImg) {
|
|
'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL')&&!this.isImg) {
|
|
if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO') {
|
|
if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO') {
|
|
- params.type = 2
|
|
|
|
- } else {
|
|
|
|
params.type = 1
|
|
params.type = 1
|
|
|
|
+ } else {
|
|
|
|
+ params.type = 2
|
|
}
|
|
}
|
|
this.showVideoList('/bytedance/batch/getVideoList', params)
|
|
this.showVideoList('/bytedance/batch/getVideoList', params)
|
|
} else if(this.isImg){
|
|
} else if(this.isImg){
|
|
@@ -357,7 +363,7 @@
|
|
|
|
|
|
this.isImg=true;
|
|
this.isImg=true;
|
|
var params = {}
|
|
var params = {}
|
|
- params.accountId = '1649600126891015'
|
|
|
|
|
|
+ params.accountId = this.accountInfo.value
|
|
params.pageSize = this.ipagination.pageSize
|
|
params.pageSize = this.ipagination.pageSize
|
|
params.pageNo = this.ipagination.current
|
|
params.pageNo = this.ipagination.current
|
|
if (this.time.length > 0) {
|
|
if (this.time.length > 0) {
|
|
@@ -399,7 +405,7 @@
|
|
this.isImg=false
|
|
this.isImg=false
|
|
this.ipagination.current = 1
|
|
this.ipagination.current = 1
|
|
var params = {}
|
|
var params = {}
|
|
- params.accountId = '1649600126891015'
|
|
|
|
|
|
+ params.accountId = this.accountInfo.value
|
|
params.pageSize = this.ipagination.pageSize
|
|
params.pageSize = this.ipagination.pageSize
|
|
params.pageNo = this.ipagination.current
|
|
params.pageNo = this.ipagination.current
|
|
if (this.time.length > 0) {
|
|
if (this.time.length > 0) {
|
|
@@ -409,9 +415,9 @@
|
|
if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO' || this.materialType ==
|
|
if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO' || this.materialType ==
|
|
'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL') {
|
|
'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL') {
|
|
if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO') {
|
|
if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO') {
|
|
- params.type = 2
|
|
|
|
- } else {
|
|
|
|
params.type = 1
|
|
params.type = 1
|
|
|
|
+ } else {
|
|
|
|
+ params.type = 2
|
|
}
|
|
}
|
|
|
|
|
|
this.showVideoList('/bytedance/batch/getVideoList', params)
|
|
this.showVideoList('/bytedance/batch/getVideoList', params)
|
|
@@ -435,18 +441,20 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
judge(item) {
|
|
judge(item) {
|
|
|
|
+ // console.log(item)
|
|
var re = /{(.*?)}/g
|
|
var re = /{(.*?)}/g
|
|
var array = []
|
|
var array = []
|
|
var temp
|
|
var temp
|
|
- while ((temp = re.exec(item.text))) {
|
|
|
|
|
|
+ while ((temp = re.exec(item.title))) {
|
|
array.push(temp[1])
|
|
array.push(temp[1])
|
|
}
|
|
}
|
|
- console.log(array)
|
|
|
|
- item.countTag = array.length
|
|
|
|
|
|
+ // console.log(array)
|
|
|
|
+ item.countTag = array.length;
|
|
|
|
+ // console.log(item.countTag )
|
|
},
|
|
},
|
|
getChange(item, tag, index) {
|
|
getChange(item, tag, index) {
|
|
this.judge(item)
|
|
this.judge(item)
|
|
- if (item.text == '') {
|
|
|
|
|
|
+ if (item.title == '') {
|
|
item.countTag = 0
|
|
item.countTag = 0
|
|
}
|
|
}
|
|
if (item.countTag >= 2) {
|
|
if (item.countTag >= 2) {
|
|
@@ -473,7 +481,7 @@
|
|
if (restoreTop > 0) {
|
|
if (restoreTop > 0) {
|
|
node.scrollTop = restoreTop
|
|
node.scrollTop = restoreTop
|
|
}
|
|
}
|
|
- item.text = node.value
|
|
|
|
|
|
+ item.title = node.value
|
|
item.creativeWordIds.push(tag.creative_word_id)
|
|
item.creativeWordIds.push(tag.creative_word_id)
|
|
node.focus()
|
|
node.focus()
|
|
node.selectionStart = startPos + v.length
|
|
node.selectionStart = startPos + v.length
|
|
@@ -482,13 +490,13 @@
|
|
//OTHER
|
|
//OTHER
|
|
node.value += v
|
|
node.value += v
|
|
item.creativeWordIds.push(tag.creative_word_id)
|
|
item.creativeWordIds.push(tag.creative_word_id)
|
|
- item.text = node.value
|
|
|
|
|
|
+ item.title = node.value
|
|
node.focus()
|
|
node.focus()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
getChangeAllTitle(item, tag, index) {
|
|
getChangeAllTitle(item, tag, index) {
|
|
this.judge(item)
|
|
this.judge(item)
|
|
- if (item.text == '') {
|
|
|
|
|
|
+ if (item.title == '') {
|
|
item.countTag = 0
|
|
item.countTag = 0
|
|
}
|
|
}
|
|
if (item.countTag >= 2) {
|
|
if (item.countTag >= 2) {
|
|
@@ -514,23 +522,24 @@
|
|
if (restoreTop > 0) {
|
|
if (restoreTop > 0) {
|
|
node.scrollTop = restoreTop
|
|
node.scrollTop = restoreTop
|
|
}
|
|
}
|
|
- item.text = node.value
|
|
|
|
|
|
+ item.title = node.value
|
|
node.focus()
|
|
node.focus()
|
|
node.selectionStart = startPos + v.length
|
|
node.selectionStart = startPos + v.length
|
|
node.selectionEnd = startPos + v.length
|
|
node.selectionEnd = startPos + v.length
|
|
} else {
|
|
} else {
|
|
//OTHER
|
|
//OTHER
|
|
node.value += v
|
|
node.value += v
|
|
- item.text = node.value
|
|
|
|
|
|
+ item.title = node.value
|
|
node.focus()
|
|
node.focus()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
showElseClick(item) {
|
|
showElseClick(item) {
|
|
|
|
+ console.log(item)
|
|
item.showElse = !item.showElse
|
|
item.showElse = !item.showElse
|
|
if (!item.showElse) {
|
|
if (!item.showElse) {
|
|
item.many = this.tags.length
|
|
item.many = this.tags.length
|
|
} else {
|
|
} else {
|
|
- item.many = 3
|
|
|
|
|
|
+ item.many = 5
|
|
}
|
|
}
|
|
},
|
|
},
|
|
materialTypeChange() {
|
|
materialTypeChange() {
|
|
@@ -605,13 +614,13 @@
|
|
ImageMode: type,
|
|
ImageMode: type,
|
|
imageUrl: '',
|
|
imageUrl: '',
|
|
imageId: '',
|
|
imageId: '',
|
|
- text: '',
|
|
|
|
|
|
+ title: '',
|
|
creativeWordIds: [],
|
|
creativeWordIds: [],
|
|
vadioUrl: '',
|
|
vadioUrl: '',
|
|
videoId: '',
|
|
videoId: '',
|
|
multiple: [],
|
|
multiple: [],
|
|
countTag: 0,
|
|
countTag: 0,
|
|
- many: 3,
|
|
|
|
|
|
+ many: 5,
|
|
showElse: true
|
|
showElse: true
|
|
})
|
|
})
|
|
this.HorizontalLargeImageList = this.HorizontalLargeImageListSmall
|
|
this.HorizontalLargeImageList = this.HorizontalLargeImageListSmall
|
|
@@ -621,7 +630,7 @@
|
|
imageMode: type,
|
|
imageMode: type,
|
|
imageUrl: '',
|
|
imageUrl: '',
|
|
imageId: '',
|
|
imageId: '',
|
|
- text: '',
|
|
|
|
|
|
+ title: '',
|
|
creativeWordIds: [],
|
|
creativeWordIds: [],
|
|
vadioUrl: '',
|
|
vadioUrl: '',
|
|
videoId: '',
|
|
videoId: '',
|
|
@@ -638,7 +647,7 @@
|
|
imageMode: type,
|
|
imageMode: type,
|
|
imageUrl: '',
|
|
imageUrl: '',
|
|
imageId: '',
|
|
imageId: '',
|
|
- text: '',
|
|
|
|
|
|
+ title: '',
|
|
creativeWordIds: [],
|
|
creativeWordIds: [],
|
|
vadioUrl: '',
|
|
vadioUrl: '',
|
|
videoId: '',
|
|
videoId: '',
|
|
@@ -655,7 +664,7 @@
|
|
imageMode: type,
|
|
imageMode: type,
|
|
imageUrl: '',
|
|
imageUrl: '',
|
|
imageId: '',
|
|
imageId: '',
|
|
- text: '',
|
|
|
|
|
|
+ title: '',
|
|
creativeWordIds: [],
|
|
creativeWordIds: [],
|
|
vadioUrl: '',
|
|
vadioUrl: '',
|
|
videoId: '',
|
|
videoId: '',
|
|
@@ -672,7 +681,7 @@
|
|
imageMode: type,
|
|
imageMode: type,
|
|
imageUrl: '',
|
|
imageUrl: '',
|
|
imageId: '',
|
|
imageId: '',
|
|
- text: '',
|
|
|
|
|
|
+ title: '',
|
|
creativeWordIds: [],
|
|
creativeWordIds: [],
|
|
vadioUrl: '',
|
|
vadioUrl: '',
|
|
videoId: '',
|
|
videoId: '',
|
|
@@ -689,7 +698,7 @@
|
|
imageMode: type,
|
|
imageMode: type,
|
|
imageUrl: '',
|
|
imageUrl: '',
|
|
imageId: '',
|
|
imageId: '',
|
|
- text: '',
|
|
|
|
|
|
+ title: '',
|
|
creativeWordIds: [],
|
|
creativeWordIds: [],
|
|
vadioUrl: '',
|
|
vadioUrl: '',
|
|
videoId: '',
|
|
videoId: '',
|
|
@@ -707,12 +716,14 @@
|
|
this.HorizontalLargeImageList.splice(index, 1)
|
|
this.HorizontalLargeImageList.splice(index, 1)
|
|
},
|
|
},
|
|
getTags() {
|
|
getTags() {
|
|
- // let accountInfo = localStorage.getItem('accountInfo')
|
|
|
|
|
|
+ let accountInfo = localStorage.getItem('accountInfo')
|
|
// console.log(groupInfo)
|
|
// console.log(groupInfo)
|
|
|
|
+ this.accountInfo=JSON.parse(accountInfo)
|
|
|
|
|
|
getAction('/bytedance/batch/creative/words/get', {
|
|
getAction('/bytedance/batch/creative/words/get', {
|
|
- accountId: '1649600126891015'
|
|
|
|
|
|
+ accountId: this.accountInfo.value
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
|
+ console.log(res)
|
|
if (res.code == '0') {
|
|
if (res.code == '0') {
|
|
this.tags = res.creative_word
|
|
this.tags = res.creative_word
|
|
} else {
|
|
} else {
|
|
@@ -760,7 +771,7 @@
|
|
console.log(n)
|
|
console.log(n)
|
|
if (n.length > 0) {
|
|
if (n.length > 0) {
|
|
var params = {}
|
|
var params = {}
|
|
- params.accountId = "1649600126891015"
|
|
|
|
|
|
+ params.accountId = this.accountInfo.value
|
|
params.pageSize = this.ipagination.pageSize
|
|
params.pageSize = this.ipagination.pageSize
|
|
params.pageNo = 1
|
|
params.pageNo = 1
|
|
params.startDate = moment(n[0]).format('YYYY-MM-DD')
|
|
params.startDate = moment(n[0]).format('YYYY-MM-DD')
|
|
@@ -768,7 +779,7 @@
|
|
this.showVideoList('/bytedance/batch/getVideoList', params)
|
|
this.showVideoList('/bytedance/batch/getVideoList', params)
|
|
} else {
|
|
} else {
|
|
var params = {}
|
|
var params = {}
|
|
- params.accountId = "1649600126891015"
|
|
|
|
|
|
+ params.accountId = this.accountInfo.value
|
|
params.pageSize = this.ipagination.pageSize
|
|
params.pageSize = this.ipagination.pageSize
|
|
params.pageNo = 1
|
|
params.pageNo = 1
|
|
this.ipagination.current = 1
|
|
this.ipagination.current = 1
|
|
@@ -864,7 +875,9 @@
|
|
margin: 0;
|
|
margin: 0;
|
|
padding: 0;
|
|
padding: 0;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ .moreTags{
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
.moduler {
|
|
.moduler {
|
|
background: #fff;
|
|
background: #fff;
|
|
margin-bottom: 16px;
|
|
margin-bottom: 16px;
|