|
@@ -276,6 +276,8 @@ li.chouzhen.first:before {
|
|
|
<a-form-item label="广告语" :labelCol="labelCol" :wrapperCol="wrapperCol" class="step4-else">
|
|
|
<a @click="addCaptions('captionsList')" :disabled="captionsList.length >= 3">添加广告语</a>
|
|
|
({{ captionsCount + '/3' }})
|
|
|
+ <a style="margin:0 10px" @click="collection('captionsList')" :disabled="captionsCount==0">收藏</a>
|
|
|
+ <a @click="showCunTitle('captionsList')">收藏列表</a>
|
|
|
<div
|
|
|
v-for="(item, index) in captionsList"
|
|
|
style="
|
|
@@ -317,17 +319,6 @@ li.chouzhen.first:before {
|
|
|
:style="{ display: captionsList.length == 1 ? 'none' : 'block' }"
|
|
|
/>
|
|
|
</div>
|
|
|
-
|
|
|
- <!-- <span v-if="description.length>30" style="color:red">广告语长度不能超过30个字符</span>
|
|
|
- <br />
|
|
|
- <a @click="cunTitle(index,bestIndex)">收藏</a>
|
|
|
- <a @click="showCunTitle(index,bestIndex)" style="margin-left:10px">收藏列表</a>
|
|
|
- <br />
|
|
|
- <a-tag
|
|
|
- v-for="(itemTag,indexTag) of tags"
|
|
|
- :key="indexTag"
|
|
|
- @click="getChange(item, itemTag, index)"
|
|
|
- >{{itemTag.name}}</a-tag>-->
|
|
|
</a-form-item>
|
|
|
<!-- stickerStyles -->
|
|
|
<!-- coverSlogansList -->
|
|
@@ -343,6 +334,8 @@ li.chouzhen.first:before {
|
|
|
<a-form-item label="封面广告语" :labelCol="labelCol" :wrapperCol="wrapperCol" class="step4-else" v-if="stickerStyles.length>0">
|
|
|
<a @click="addCaptions('coverSlogansList')" :disabled="coverCount >= 6">添加封面广告语</a>
|
|
|
({{ coverCount + '/6' }})
|
|
|
+ <a style="margin:0 10px" @click="collection('coverSlogansList')" :disabled="coverCount==0">收藏</a>
|
|
|
+ <a @click="showCunTitle('coverSlogansList')">收藏列表</a>
|
|
|
<div
|
|
|
v-for="(item, index) in coverSlogansList"
|
|
|
style="
|
|
@@ -384,6 +377,28 @@ li.chouzhen.first:before {
|
|
|
/>
|
|
|
</div>
|
|
|
</a-form-item>
|
|
|
+
|
|
|
+ <a-form-item label="创意分类" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
|
+ <a-cascader
|
|
|
+ :options="createOptions"
|
|
|
+ v-decorator="['creativeCategory', { rules: [{ required: true, message: '创意分类' }] }]"
|
|
|
+ :fieldNames="fieldNames"
|
|
|
+ placeholder="请选择创意分类"
|
|
|
+ />
|
|
|
+ </a-form-item>
|
|
|
+
|
|
|
+ <a-form-item label="创意标签" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
|
+ <a-select
|
|
|
+ mode="tags"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="按回车生成标签"
|
|
|
+ v-decorator="['creativeTag', { rules: [{ required: true, message: '创意标签必填' }] }]"
|
|
|
+ dropdownClassName="display-none-selset"
|
|
|
+ :token-separators="[',',' ',',']"
|
|
|
+ >
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+
|
|
|
<a-form-item label="行动号召" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
|
<a-select
|
|
|
v-decorator="['actionBarText', { rules: [{ required: true, message: '行动号召按钮文案' }] }]"
|
|
@@ -442,21 +457,6 @@ li.chouzhen.first:before {
|
|
|
<a-modal :maskClosable="false" v-model="visible" title="广告创意创建情况">
|
|
|
<div style="font-size: 24px">
|
|
|
{{ allForm.success }}
|
|
|
- <!-- 创建成功:{{ allForm.success.length }}条
|
|
|
- <div style="margin-top: 20px">
|
|
|
- <p v-for="(item, index) of allForm.success" :key="index">
|
|
|
- <span>名称:{{ item.creativeName }}</span>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <br />
|
|
|
- 创建失败:{{ allForm.fail.length }}条
|
|
|
- <div style="margin-top: 20px">
|
|
|
- <p v-for="(item, index) of allForm.fail" :key="index">
|
|
|
- <span>名称:{{ item.creativeName }}</span>
|
|
|
- <br />
|
|
|
- <span>错误信息:{{ item.failMessage }}</span>
|
|
|
- </p>
|
|
|
- </div> -->
|
|
|
</div>
|
|
|
<div v-if="allForm.fail">失败原因:{{ allForm.fail }}</div>
|
|
|
<template slot="footer">
|
|
@@ -672,20 +672,26 @@ li.chouzhen.first:before {
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-modal>
|
|
|
- <a-modal title="收藏标题" v-model="cunTitleVisible" :width="1000" :footer="null">
|
|
|
+ <a-modal title="收藏标题" v-model="cunTitleVisible" :width="1000" @ok="okTitleCun">
|
|
|
<a-row :gutter="10">
|
|
|
<a-col :sm="24" style="margin-bottom: 20px; z-index: 10">
|
|
|
<a-card class="search-box" style="over-flow: auto">
|
|
|
- <a-list size="large" bordered :dataSource="cunTitleList">
|
|
|
- <a-list-item slot="renderItem" slot-scope="item">
|
|
|
- <div slot="actions">
|
|
|
- <a @click="okTitleCun(item)">选择</a>
|
|
|
- <a-divider type="vertical" />
|
|
|
- <a @click="removeTitleCun(item)">删除</a>
|
|
|
- </div>
|
|
|
- {{ item.title }}
|
|
|
- </a-list-item>
|
|
|
- </a-list>
|
|
|
+ <a-checkbox-group v-model="guanggao" style="width:100%">
|
|
|
+ <a-list size="large" bordered :dataSource="cunTitleList">
|
|
|
+ <a-list-item slot="renderItem" slot-scope="item">
|
|
|
+
|
|
|
+ <div slot="actions">
|
|
|
+ <!-- <a @click="okTitleCun(item)">选择</a>
|
|
|
+ <a-divider type="vertical" /> -->
|
|
|
+ <a @click="removeTitleCun(item)">删除</a>
|
|
|
+ </div>
|
|
|
+ <a-checkbox :value="item">
|
|
|
+ {{ item.captions?item.captions:item.coverSlogans }}
|
|
|
+ </a-checkbox>
|
|
|
+ </a-list-item>
|
|
|
+
|
|
|
+ </a-list>
|
|
|
+ </a-checkbox-group>
|
|
|
</a-card>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -770,6 +776,13 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ fieldNames: {
|
|
|
+ label: 'category_name',
|
|
|
+ value: 'category_id',
|
|
|
+ children: 'child',
|
|
|
+ },
|
|
|
+ createOptions: [],
|
|
|
+ guanggao: [],
|
|
|
stickerStylesValue: [],
|
|
|
coverSlogansList: [{ coverSlogans: '' }],
|
|
|
stickerStyles: [],
|
|
@@ -912,13 +925,31 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- addCaptions(type) {
|
|
|
+ addCaptions(type) {
|
|
|
if (type == 'captionsList') {
|
|
|
this.captionsList.push({ captions: '' })
|
|
|
} else {
|
|
|
this.coverSlogansList.push({ coverSlogans: '' })
|
|
|
}
|
|
|
},
|
|
|
+ collection(type) {
|
|
|
+ var params = {}
|
|
|
+ params.userId = this.userInfo().id
|
|
|
+ params.accountId = localStorage.getItem('accountId')
|
|
|
+ if (type == 'captionsList') {
|
|
|
+ // this.captionsList.push({ captions: '' })
|
|
|
+ params.captionsList = this.captionsList
|
|
|
+ } else {
|
|
|
+ // this.coverSlogansList.push({ coverSlogans: '' })
|
|
|
+ params.coverSlogansList = this.coverSlogansList
|
|
|
+ }
|
|
|
+ postAction('/kuaishou/collectionSlogans/add', params).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success('收藏成功')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
deleteCaptions(index, type) {
|
|
|
if (type == 'captionsList') {
|
|
|
this.captionsList.splice(index, 1)
|
|
@@ -1050,38 +1081,91 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- showCunTitle(index, bestIndex) {
|
|
|
- nowIndex = index
|
|
|
- bestIndex = bestIndex
|
|
|
+ showCunTitle(type) {
|
|
|
this.cunTitleVisible = true
|
|
|
- this.getCunTitle()
|
|
|
+ this.getCunTitle(type)
|
|
|
},
|
|
|
- getCunTitle() {
|
|
|
+ getCunTitle(typeAdd) {
|
|
|
var params = {}
|
|
|
params.accountId = localStorage.getItem('accountId')
|
|
|
params.userId = this.userInfo().id
|
|
|
- params.pageNo = 1
|
|
|
- params.pageSize = 500
|
|
|
- getAction('/kuaishou/kuaiShouTitleCollection/list', params).then((res) => {
|
|
|
+ params.type = typeAdd == 'captionsList' ? 2 : 1
|
|
|
+ // params.pageNo = 1
|
|
|
+ // params.pageSize = 500
|
|
|
+ // /kuaishou/collectionSlogans/getByUserId?userId=12312312321&accountId=12&type=1
|
|
|
+ getAction('/kuaishou/collectionSlogans/getByUserId', params).then((res) => {
|
|
|
if (res.success) {
|
|
|
console.log(res.result)
|
|
|
- this.cunTitleList = res.result.records
|
|
|
+ this.cunTitleList = res.result.value
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
removeTitleCun(item) {
|
|
|
- deleteAction('/kuaishou/kuaiShouTitleCollection/delete', {
|
|
|
- id: item.id,
|
|
|
- }).then((res) => {
|
|
|
+ console.log(item)
|
|
|
+ var typeAdd = null
|
|
|
+ if (item.captions) {
|
|
|
+ var index = this.cunTitleList.findIndex((v) => v.captions === item.captions)
|
|
|
+ this.cunTitleList.splice(index, 1)
|
|
|
+ var params = {}
|
|
|
+ params.userId = this.userInfo().id
|
|
|
+ params.accountId = localStorage.getItem('accountId')
|
|
|
+
|
|
|
+ params.captionsList = this.cunTitleList
|
|
|
+ params.type = 'delete'
|
|
|
+ typeAdd = 'captionsList'
|
|
|
+ } else {
|
|
|
+ var index = this.cunTitleList.findIndex((v) => v.coverSlogans === item.coverSlogans)
|
|
|
+ this.cunTitleList.splice(index, 1)
|
|
|
+ var params = {}
|
|
|
+ params.userId = this.userInfo().id
|
|
|
+ params.accountId = localStorage.getItem('accountId')
|
|
|
+
|
|
|
+ params.coverSlogansList = this.cunTitleList
|
|
|
+ params.type = 'delete'
|
|
|
+ typeAdd = 'coverSlogansList'
|
|
|
+ }
|
|
|
+ // var index = this.cunTitleList.findIndex((v) => v.captions === item.captions)
|
|
|
+ // this.cunTitleList.splice(index, 1)
|
|
|
+ // var params = {}
|
|
|
+ // params.userId = this.userInfo().id
|
|
|
+ // params.accountId = localStorage.getItem('accountId')
|
|
|
+
|
|
|
+ // params.captionsList = this.cunTitleList
|
|
|
+ // params.type = 'delete'
|
|
|
+ postAction('/kuaishou/collectionSlogans/add', params).then((res) => {
|
|
|
+ console.log(res)
|
|
|
if (res.success) {
|
|
|
- this.getCunTitle()
|
|
|
+ this.$message.success('删除成功')
|
|
|
+ this.getCunTitle(typeAdd)
|
|
|
}
|
|
|
})
|
|
|
+ // deleteAction('/kuaishou/kuaiShouTitleCollection/delete', {
|
|
|
+ // id: item.id,
|
|
|
+ // }).then((res) => {
|
|
|
+ // if (res.success) {
|
|
|
+ // this.getCunTitle()
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
okTitleCun(item) {
|
|
|
- this.pans[bestIndex].list[nowIndex].description = item.title
|
|
|
+ if (this.guanggao.length > 0) {
|
|
|
+ if (this.guanggao[0].captions) {
|
|
|
+ if(this.guanggao.length>3){
|
|
|
+ this.$message.error('广告语最多选择3条')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.captionsList = []
|
|
|
+ this.captionsList.push(...this.guanggao)
|
|
|
+ } else {
|
|
|
+ if(this.guanggao.length>6){
|
|
|
+ this.$message.error('封面广告语最多选择6条')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.coverSlogansList = []
|
|
|
+ this.coverSlogansList.push(...this.guanggao)
|
|
|
+ }
|
|
|
+ }
|
|
|
this.cunTitleVisible = false
|
|
|
- this.cunTitleList = []
|
|
|
},
|
|
|
searchQuery() {
|
|
|
// /ctop/creativeTitle/titleSuggestion
|
|
@@ -1430,6 +1514,7 @@ export default {
|
|
|
var params = {
|
|
|
// dataJson: allJson,
|
|
|
...values,
|
|
|
+ creativeCategory:values.creativeCategory.pop(),
|
|
|
unitId: this.pansKey,
|
|
|
accountId: localStorage.getItem('accountId'),
|
|
|
content: this.content,
|
|
@@ -1993,6 +2078,12 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
watch: {
|
|
|
+ cunTitleVisible(n,o){
|
|
|
+ if(!n){
|
|
|
+ this.guanggao = []
|
|
|
+ this.cunTitleList = []
|
|
|
+ }
|
|
|
+ },
|
|
|
time(n, o) {
|
|
|
console.log(n)
|
|
|
if (n.length > 0) {
|
|
@@ -2089,16 +2180,31 @@ export default {
|
|
|
this.tags = res.result
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+
|
|
|
+ getAction('/kuaishou/batch/getCreativeCategory', {
|
|
|
+ accountId: localStorage.getItem('accountId'),
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ console.log(res)
|
|
|
+ this.createOptions = res.result
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
getAction('/kuaishou/batch/getCreativeWordStyles', {
|
|
|
accountId: localStorage.getItem('accountId'),
|
|
|
}).then((res) => {
|
|
|
if (res.success) {
|
|
|
- this.stickerStyles = res.result.map((item) => {
|
|
|
- return {
|
|
|
- id: item.sticker_style_id,
|
|
|
- url: item.sticker_styles[0],
|
|
|
- }
|
|
|
- })
|
|
|
+ if (res.result) {
|
|
|
+ this.stickerStyles = res.result.map((item) => {
|
|
|
+ return {
|
|
|
+ id: item.sticker_style_id,
|
|
|
+ url: item.sticker_styles[0],
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.stickerStyles = []
|
|
|
+ }
|
|
|
} else {
|
|
|
this.stickerStyles = []
|
|
|
}
|