|
@@ -1,4 +1,10 @@
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
|
+.slick-prev {
|
|
|
|
+ z-index: 1000000;
|
|
|
|
+}
|
|
|
|
+.slick-next {
|
|
|
|
+ z-index: 1000000;
|
|
|
|
+}
|
|
.chouzhen {
|
|
.chouzhen {
|
|
border-style: solid;
|
|
border-style: solid;
|
|
border-width: 1px;
|
|
border-width: 1px;
|
|
@@ -128,10 +134,17 @@ li.chouzhen.first:before {
|
|
</div>
|
|
</div>
|
|
</a-layout-header>
|
|
</a-layout-header>
|
|
<div style="width: 100%; padding: 0 20px" class="chartBox">
|
|
<div style="width: 100%; padding: 0 20px" class="chartBox">
|
|
- <a-card title="预览区">
|
|
|
|
|
|
+ <a-card>
|
|
|
|
+ <div slot="title">
|
|
|
|
+ <a-button style="margin: 0 15px 0 0" @click="backNewBatch" :disabled="newBatch"> 返回 </a-button>
|
|
|
|
+ 预览区
|
|
|
|
+ </div>
|
|
<div slot="extra">
|
|
<div slot="extra">
|
|
预估生成<span style="color: #409EFF">{{ groupCount }}</span
|
|
预估生成<span style="color: #409EFF">{{ groupCount }}</span
|
|
- >个广告组 <a-button type="primary" style="margin: 0 15px"> 全部提交审核 </a-button>
|
|
|
|
|
|
+ >个广告组
|
|
|
|
+ <a-button type="primary" style="margin: 0 15px" @click="createAll" :disabled="groupCount == 0">
|
|
|
|
+ 全部提交审核
|
|
|
|
+ </a-button>
|
|
</div>
|
|
</div>
|
|
<div v-if="campaignList">
|
|
<div v-if="campaignList">
|
|
<h2 style="display: flex; justify-content: space-between">
|
|
<h2 style="display: flex; justify-content: space-between">
|
|
@@ -148,12 +161,12 @@ li.chouzhen.first:before {
|
|
<a-button style="margin: 0 15px"> 批量修改 <a-icon type="down" /> </a-button>
|
|
<a-button style="margin: 0 15px"> 批量修改 <a-icon type="down" /> </a-button>
|
|
</a-dropdown>
|
|
</a-dropdown>
|
|
<a-popconfirm :title="`确定要删除这 ${groupCheck.length} 项吗?`" @confirm="handleConfirmDelete">
|
|
<a-popconfirm :title="`确定要删除这 ${groupCheck.length} 项吗?`" @confirm="handleConfirmDelete">
|
|
- <a-button style="margin: 0 15px" :disabled="groupCheck.length == 0" @click="">
|
|
|
|
- 批量删除广告组
|
|
|
|
- </a-button>
|
|
|
|
|
|
+ <a-button style="margin: 0 15px" :disabled="groupCheck.length == 0"> 批量删除广告组 </a-button>
|
|
</a-popconfirm>
|
|
</a-popconfirm>
|
|
|
|
|
|
- <a-button type="primary" style="margin: 0 15px"> 全部提交审核 </a-button>
|
|
|
|
|
|
+ <a-button type="primary" style="margin: 0 15px" :disabled="groupCheck.length == 0" @click="createArr">
|
|
|
|
+ 提交审核
|
|
|
|
+ </a-button>
|
|
</div>
|
|
</div>
|
|
</h2>
|
|
</h2>
|
|
<!-- <div v-for="(item, index) in campaignList" :key="index"></div> -->
|
|
<!-- <div v-for="(item, index) in campaignList" :key="index"></div> -->
|
|
@@ -170,7 +183,7 @@ li.chouzhen.first:before {
|
|
<span style="width: 10%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
|
|
<span style="width: 10%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
|
|
>预算:{{ item.dayBudget ? item.dayBudget / 1000 + '元' : '不限' }}</span
|
|
>预算:{{ item.dayBudget ? item.dayBudget / 1000 + '元' : '不限' }}</span
|
|
>
|
|
>
|
|
- <a-checkbox style="width: 10%" v-model="item.checkAll" @click.stop> 全选 </a-checkbox>
|
|
|
|
|
|
+ <!-- <a-checkbox style="width: 10%" v-model="item.checkAll" @click.stop="setAll(item)"> 全选 </a-checkbox> -->
|
|
</h3>
|
|
</h3>
|
|
</template>
|
|
</template>
|
|
<a-table
|
|
<a-table
|
|
@@ -210,31 +223,36 @@ li.chouzhen.first:before {
|
|
</span>
|
|
</span>
|
|
<span slot="dayBudget" slot-scope="text, records">
|
|
<span slot="dayBudget" slot-scope="text, records">
|
|
<p style="text-align: left">
|
|
<p style="text-align: left">
|
|
- 预算:{{ records.dayBudget || records.dayBudget == 0 ? records.dayBudget / 1000 + '元' : '不限' }}
|
|
|
|
|
|
+ 预算:{{ records.dayBudget || records.dayBudget > 0 ? records.dayBudget / 1000 + '元' : '不限' }}
|
|
</p>
|
|
</p>
|
|
<p style="text-align: left">
|
|
<p style="text-align: left">
|
|
出价:{{ records.bid ? records.bid / 1000 : records.cpaBid ? records.cpaBid / 1000 : '' }}元
|
|
出价:{{ records.bid ? records.bid / 1000 : records.cpaBid ? records.cpaBid / 1000 : '' }}元
|
|
</p>
|
|
</p>
|
|
- <p style="text-align: left">
|
|
|
|
|
|
+ <p style="text-align: left" v-if="records.deepConversionType">
|
|
深度转化出价:{{ records.deepConversionBid ? records.deepConversionBid / 1000 : '无' }}
|
|
深度转化出价:{{ records.deepConversionBid ? records.deepConversionBid / 1000 : '无' }}
|
|
</p>
|
|
</p>
|
|
<a-icon
|
|
<a-icon
|
|
type="edit"
|
|
type="edit"
|
|
style="float: left; color: #409EFF"
|
|
style="float: left; color: #409EFF"
|
|
class="count"
|
|
class="count"
|
|
- @click.stop="editBid(records, records.bid ? 'bid' : 'cpaBid')"
|
|
|
|
|
|
+ @click.stop="editBid(records, records.bidType==2 ? 'bid' : 'cpaBid')"
|
|
/>
|
|
/>
|
|
</span>
|
|
</span>
|
|
<span slot="appId" slot-scope="text, records">
|
|
<span slot="appId" slot-scope="text, records">
|
|
|
|
+ <div style="width: 100%" v-if="text">
|
|
|
|
+ <p style="text-align: left">
|
|
|
|
+ {{ setAppName(text) }}
|
|
|
|
+ </p>
|
|
|
|
+ <a-icon
|
|
|
|
+ type="edit"
|
|
|
|
+ style="float: left; color: #409EFF; margin-top: 5px"
|
|
|
|
+ class="count"
|
|
|
|
+ @click="editAppAndSite(records)"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
<p style="text-align: left">
|
|
<p style="text-align: left">
|
|
- {{ setAppName(text) }}
|
|
|
|
|
|
+ {{ records.url }}
|
|
</p>
|
|
</p>
|
|
- <a-icon
|
|
|
|
- type="edit"
|
|
|
|
- style="float: left; color: #409EFF; margin-top: 5px"
|
|
|
|
- class="count"
|
|
|
|
- @click="editAppAndSite(records)"
|
|
|
|
- />
|
|
|
|
</span>
|
|
</span>
|
|
<span slot="action" slot-scope="text, record">
|
|
<span slot="action" slot-scope="text, record">
|
|
<a-popconfirm :title="`确定要删除这项吗?`" @confirm="removeGroup(record.id)">
|
|
<a-popconfirm :title="`确定要删除这项吗?`" @confirm="removeGroup(record.id)">
|
|
@@ -266,9 +284,9 @@ li.chouzhen.first:before {
|
|
@click.stop="editClickTrackUrl(records)"
|
|
@click.stop="editClickTrackUrl(records)"
|
|
/>
|
|
/>
|
|
</span>
|
|
</span>
|
|
- <span slot="isSuccess" slot-scope="text, records">{{ text ? '待提交' : '提交成功' }}</span>
|
|
|
|
|
|
+ <span slot="isSuccess" slot-scope="text, records">{{ text == 0 ? '待提交' : '提交成功' }}</span>
|
|
<span slot="siteId" slot-scope="text, records">
|
|
<span slot="siteId" slot-scope="text, records">
|
|
- {{ text ? setSiteName(records.appId, text) : '无' }}
|
|
|
|
|
|
+ {{ text ? text : '无' }}
|
|
</span>
|
|
</span>
|
|
</a-table>
|
|
</a-table>
|
|
</el-collapse-item>
|
|
</el-collapse-item>
|
|
@@ -313,13 +331,22 @@ li.chouzhen.first:before {
|
|
<a-input-number
|
|
<a-input-number
|
|
v-decorator="['dayBudget']"
|
|
v-decorator="['dayBudget']"
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
- placeholder="不小于500,不超过100000000,仅支持输入自然数,如填0,则为不限"
|
|
|
|
|
|
+ :min="500"
|
|
|
|
+ :precision="0"
|
|
|
|
+ :max="100000000"
|
|
|
|
+ placeholder="不小于500,不超过100000000,仅支持输入自然数"
|
|
/>
|
|
/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
<a-form-item label="出价">
|
|
<a-form-item label="出价">
|
|
- <a-input-number v-decorator="['bid']" style="width: 100%" />
|
|
|
|
|
|
+ <a-input-number
|
|
|
|
+ v-decorator="['bid']"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ :max="getData('dayBudget', 'ruleConfigForm') ? getData('dayBudget', 'ruleConfigForm') : 3000"
|
|
|
|
+ :min="0"
|
|
|
|
+ :precision="2"
|
|
|
|
+ />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
- <a-form-item label="深度转化出价">
|
|
|
|
|
|
+ <a-form-item label="深度转化出价" v-if="deepConversionType">
|
|
<a-input-number v-decorator="['deepConversionBid']" style="width: 100%" />
|
|
<a-input-number v-decorator="['deepConversionBid']" style="width: 100%" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-form>
|
|
</a-form>
|
|
@@ -337,7 +364,7 @@ li.chouzhen.first:before {
|
|
<a-form-item label="应用">
|
|
<a-form-item label="应用">
|
|
<a-select v-decorator="['appId']" style="width: 100%" allowClear @change="setSiteId">
|
|
<a-select v-decorator="['appId']" style="width: 100%" allowClear @change="setSiteId">
|
|
<a-select-option v-for="appModel in appListArr" :key="appModel.appId" :value="appModel.appId">
|
|
<a-select-option v-for="appModel in appListArr" :key="appModel.appId" :value="appModel.appId">
|
|
- {{ appModel.appName }}
|
|
|
|
|
|
+ {{ appModel.appName }} {{ appModel.appVersion }}
|
|
</a-select-option>
|
|
</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -380,11 +407,21 @@ li.chouzhen.first:before {
|
|
</a-modal>
|
|
</a-modal>
|
|
|
|
|
|
<a-modal title="素材预览" v-model="coverPreviewVisible" :width="1000" :footer="null">
|
|
<a-modal title="素材预览" v-model="coverPreviewVisible" :width="1000" :footer="null">
|
|
- <a-carousel arrows class="cover_carousel_con" v-if="videoData.length > 0">
|
|
|
|
|
|
+ <a-carousel arrows class="cover_carousel_con" v-if="videoData.length > 0" @next="next" @prev="prev">
|
|
<div v-for="(item, index) in videoData" :key="index" class="content">
|
|
<div v-for="(item, index) in videoData" :key="index" class="content">
|
|
<div style="display: flex !important; justify-content: space-around">
|
|
<div style="display: flex !important; justify-content: space-around">
|
|
- <img :src="item.videoUrl.coverUrl" :width="300" />
|
|
|
|
- <img :src="item.imageUrl" :width="300" />
|
|
|
|
|
|
+ <div style="display: flex; flex-direction: column; align-items: center">
|
|
|
|
+ <!-- <video :src="item.videoUrl.coverUrl" :width="300" /> -->
|
|
|
|
+ <video class="video" :src="item.videoUrl.url" controls="controls" style="width: 300px">
|
|
|
|
+ 您的浏览器不支持 video 标签。
|
|
|
|
+ </video>
|
|
|
|
+ <span style="font-size: 20px; margin-top: 15px">视频素材</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div style="display: flex; flex-direction: column; align-items: center">
|
|
|
|
+ <img :src="item.imageUrl" v-if="item.imageUrl" :width="300" />
|
|
|
|
+ <img :src="item.videoUrl.coverUrl" v-else :width="300" />
|
|
|
|
+ <span style="font-size: 20px; margin-top: 15px">封面素材</span>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<a-icon
|
|
<a-icon
|
|
@@ -415,6 +452,7 @@ import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
import selectCheckAll from '@/components/formComponents/toutiaoTime'
|
|
import selectCheckAll from '@/components/formComponents/toutiaoTime'
|
|
import checkBoxGroup from '@/components/formComponents/checkBoxGroup'
|
|
import checkBoxGroup from '@/components/formComponents/checkBoxGroup'
|
|
|
|
+import { stopOtherVideo, closeAllVideoFun } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
|
|
function tqFun(qcArr1) {
|
|
function tqFun(qcArr1) {
|
|
var tempArr = []
|
|
var tempArr = []
|
|
function bbFun(qcArr) {
|
|
function bbFun(qcArr) {
|
|
@@ -465,6 +503,7 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ newBatch: false,
|
|
videoData: [],
|
|
videoData: [],
|
|
coverPreviewVisible: false,
|
|
coverPreviewVisible: false,
|
|
clickTrackUrlEditVisible: false,
|
|
clickTrackUrlEditVisible: false,
|
|
@@ -601,9 +640,13 @@ export default {
|
|
bid: null,
|
|
bid: null,
|
|
dayBudget: null,
|
|
dayBudget: null,
|
|
deepConversionBid: null,
|
|
deepConversionBid: null,
|
|
|
|
+ deepConversionType: false,
|
|
siteList: [],
|
|
siteList: [],
|
|
allData: null,
|
|
allData: null,
|
|
editAll: false,
|
|
editAll: false,
|
|
|
|
+
|
|
|
|
+ groupIds: [],
|
|
|
|
+ campaignIds: [],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -641,9 +684,73 @@ export default {
|
|
// })
|
|
// })
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ next() {
|
|
|
|
+ closeAllVideoFun()
|
|
|
|
+ },
|
|
|
|
+ prev() {
|
|
|
|
+ closeAllVideoFun()
|
|
|
|
+ },
|
|
|
|
+ createArr() {
|
|
|
|
+ this.newBatch = true
|
|
|
|
+ var params = {}
|
|
|
|
+ params.accountId = this.accountId
|
|
|
|
+ params.dataList = {
|
|
|
|
+ campaigns: this.groupCheckRow.map((item) => {
|
|
|
|
+ return item.planId
|
|
|
|
+ }),
|
|
|
|
+ groups: this.groupCheck,
|
|
|
|
+ }
|
|
|
|
+ this.postDataAction('/kuaishouBatch/creativePreview/createAdcampaignAndGroups', params).then((res) => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.getAction('/kuaishouBatch/groupPreview/deleteBatch', {
|
|
|
|
+ ids: this.groupCheck.join(),
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.groupCheck = []
|
|
|
|
+ this.getPreviewList()
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ var dataConunt = this.campaignList.filter((a) => {
|
|
|
|
+ return a.kuaishouBatchGroupPreviews.length > 0
|
|
|
|
+ })
|
|
|
|
+ if (dataConunt.length > 0) {
|
|
|
|
+ } else {
|
|
|
|
+ localStorage.removeItem('lookPreview')
|
|
|
|
+ window.close()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ setAll(item) {
|
|
|
|
+ // groupIds:[],
|
|
|
|
+ // campaignIds:[]
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ if (item.checkAll) {
|
|
|
|
+ this.groupCheck.push(
|
|
|
|
+ ...item.kuaishouBatchGroupPreviews.map((i) => {
|
|
|
|
+ return i.id
|
|
|
|
+ })
|
|
|
|
+ )
|
|
|
|
+ this.groupCheckRow = JSON.parse(JSON.stringify(item.kuaishouBatchGroupPreviews))
|
|
|
|
+ } else {
|
|
|
|
+ for (let i = 0; i < item.kuaishouBatchGroupPreviews.length; i++) {
|
|
|
|
+ var index = this.groupCheck.findIndex((c) => c == item.kuaishouBatchGroupPreviews[i].id)
|
|
|
|
+ var indexTwo = this.groupCheckRow.findIndex((c) => c.id == item.kuaishouBatchGroupPreviews[i].id)
|
|
|
|
+ if (index > -1) {
|
|
|
|
+ this.groupCheck.splice(index, 1)
|
|
|
|
+ }
|
|
|
|
+ if (indexTwo > -1) {
|
|
|
|
+ this.groupCheckRow.splice(indexTwo, 1)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
handleConfirmDelete() {
|
|
handleConfirmDelete() {
|
|
- this.getAction('/kuaishouBatch/campaignPreview/deleteBatch', {
|
|
|
|
- ids: this.groupCheck,
|
|
|
|
|
|
+ this.getAction('/kuaishouBatch/groupPreview/deleteBatch', {
|
|
|
|
+ ids: this.groupCheck.join(),
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
this.groupCheck = []
|
|
this.groupCheck = []
|
|
@@ -655,6 +762,7 @@ export default {
|
|
handleMenuClick(e) {
|
|
handleMenuClick(e) {
|
|
if (e.key == '1') {
|
|
if (e.key == '1') {
|
|
this.bidEditVisible = true
|
|
this.bidEditVisible = true
|
|
|
|
+ this.bidType = this.campaignList[0].kuaishouBatchGroupPreviews[0].bidType==2?'bid':'cpaBid'
|
|
} else {
|
|
} else {
|
|
this.clickTrackUrlEditVisible = true
|
|
this.clickTrackUrlEditVisible = true
|
|
}
|
|
}
|
|
@@ -662,6 +770,7 @@ export default {
|
|
this.editAll = true
|
|
this.editAll = true
|
|
},
|
|
},
|
|
setSiteId(e) {
|
|
setSiteId(e) {
|
|
|
|
+ this.appIdConfigForm.setFieldsValue({ siteId: undefined })
|
|
this.getSiteList(e)
|
|
this.getSiteList(e)
|
|
},
|
|
},
|
|
getData(className, formName) {
|
|
getData(className, formName) {
|
|
@@ -725,7 +834,8 @@ export default {
|
|
// })
|
|
// })
|
|
},
|
|
},
|
|
setSiteName(appId, siteId) {
|
|
setSiteName(appId, siteId) {
|
|
- var data = null
|
|
|
|
|
|
+ var data = []
|
|
|
|
+
|
|
this.getAction('/kuaishou/batch/getPageList', {
|
|
this.getAction('/kuaishou/batch/getPageList', {
|
|
accountId: this.accountId,
|
|
accountId: this.accountId,
|
|
appId: appId,
|
|
appId: appId,
|
|
@@ -733,14 +843,11 @@ export default {
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
data = res.result.filter((item) => {
|
|
data = res.result.filter((item) => {
|
|
- return item.siteId == siteId
|
|
|
|
|
|
+ return item.siteId == siteId + ''
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- if (data.length > 0) {
|
|
|
|
- return data[0].name
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
editUnitName(item) {
|
|
editUnitName(item) {
|
|
this.unitNameEditVisible = true
|
|
this.unitNameEditVisible = true
|
|
@@ -766,6 +873,7 @@ export default {
|
|
this.bid = item[type] / 1000
|
|
this.bid = item[type] / 1000
|
|
this.dayBudget = item.dayBudget / 1000
|
|
this.dayBudget = item.dayBudget / 1000
|
|
this.deepConversionBid = item.deepConversionBid ? item.deepConversionBid / 1000 : null
|
|
this.deepConversionBid = item.deepConversionBid ? item.deepConversionBid / 1000 : null
|
|
|
|
+ this.deepConversionType = item.deepConversionType ? true : false
|
|
},
|
|
},
|
|
okUnitBid() {
|
|
okUnitBid() {
|
|
this.ruleConfigForm.validateFields((err, values) => {
|
|
this.ruleConfigForm.validateFields((err, values) => {
|
|
@@ -806,7 +914,7 @@ export default {
|
|
this.appIdEditVisible = true
|
|
this.appIdEditVisible = true
|
|
this.allData = item
|
|
this.allData = item
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- this.appIdConfigForm.setFieldsValue({ appId: item.appId, siteId: item.siteId })
|
|
|
|
|
|
+ this.appIdConfigForm.setFieldsValue({ appId: item.appId, siteId: item.siteId ? item.siteId + '' : undefined })
|
|
this.getSiteList(item.appId)
|
|
this.getSiteList(item.appId)
|
|
})
|
|
})
|
|
|
|
|
|
@@ -947,6 +1055,53 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ popstateFun() {
|
|
|
|
+ //监听浏览器回退的回调
|
|
|
|
+ window.history.pushState(null, null, document.URL) //想浏览器跳转记录中添加一条空记录
|
|
|
|
+ },
|
|
|
|
+ backNewBatch() {
|
|
|
|
+ var that = this
|
|
|
|
+ this.$confirm({
|
|
|
|
+ title: '返回不会保存你修改的信息,是否确定?',
|
|
|
|
+
|
|
|
|
+ onOk() {
|
|
|
|
+ window.open('/user/new-batch?accountId=' + that.accountId + '&batchId=' + that.batchId, '_self')
|
|
|
|
+ // window.close()
|
|
|
|
+ },
|
|
|
|
+ onCancel() {
|
|
|
|
+ console.log('Cancel')
|
|
|
|
+ },
|
|
|
|
+ class: 'test',
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ createAll() {
|
|
|
|
+ this.newBatch = true
|
|
|
|
+ var groupIds = []
|
|
|
|
+ for (let i = 0; i < this.campaignList.length; i++) {
|
|
|
|
+ for (let j = 0; j < this.campaignList[i].kuaishouBatchGroupPreviews.length; j++) {
|
|
|
|
+ groupIds.push(this.campaignList[i].kuaishouBatchGroupPreviews[j].id)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ var params = {}
|
|
|
|
+ params.accountId = this.accountId
|
|
|
|
+ params.dataList = {
|
|
|
|
+ campaigns: this.campaignList.map((item) => {
|
|
|
|
+ return item.id
|
|
|
|
+ }),
|
|
|
|
+ groups: groupIds,
|
|
|
|
+ }
|
|
|
|
+ console.log(params)
|
|
|
|
+ this.postDataAction('/kuaishouBatch/creativePreview/createAdcampaignAndGroups', params).then((res) => {
|
|
|
|
+ this.$success({
|
|
|
|
+ title: '全部提交成功',
|
|
|
|
+ // JSX support
|
|
|
|
+ onOk: function () {
|
|
|
|
+ localStorage.removeItem('lookPreview')
|
|
|
|
+ window.close()
|
|
|
|
+ },
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|