|
@@ -84,6 +84,9 @@ li.chouzhen.first:before {
|
|
.create-info .ant-form-item {
|
|
.create-info .ant-form-item {
|
|
margin-bottom: 0 !important;
|
|
margin-bottom: 0 !important;
|
|
}
|
|
}
|
|
|
|
+.fengmian .ant-checkbox-wrapper:first-child {
|
|
|
|
+ margin-left: 8px;
|
|
|
|
+}
|
|
@media screen and (max-width: 1200px) {
|
|
@media screen and (max-width: 1200px) {
|
|
// 这里写对应要修改的样式如:
|
|
// 这里写对应要修改的样式如:
|
|
.new-batch .el-step__title {
|
|
.new-batch .el-step__title {
|
|
@@ -218,7 +221,7 @@ li.chouzhen.first:before {
|
|
<a-col :xl="14" :md="24">
|
|
<a-col :xl="14" :md="24">
|
|
<a-form-item label="单日预算">
|
|
<a-form-item label="单日预算">
|
|
{{
|
|
{{
|
|
- groupTemplateId ? (unitInfo.dayBudget ? '不限' : unitInfo.dayBudget / 1000 + '元') : '无'
|
|
|
|
|
|
+ groupTemplateId ? (unitInfo.dayBudget ? unitInfo.dayBudget + '元' : '不限') : '无'
|
|
}}</a-form-item
|
|
}}</a-form-item
|
|
>
|
|
>
|
|
</a-col>
|
|
</a-col>
|
|
@@ -302,14 +305,13 @@ li.chouzhen.first:before {
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :xl="10" :md="24" :pull="screenWidth >= 1200 ? 4 : 0" v-if="unitInfo.deepConversionBid">
|
|
<a-col :xl="10" :md="24" :pull="screenWidth >= 1200 ? 4 : 0" v-if="unitInfo.deepConversionBid">
|
|
- <a-form-item label="深度转化目标出价">
|
|
|
|
-
|
|
|
|
- <div v-if="groupTemplateId == null">无</div>
|
|
|
|
|
|
+ <a-form-item label="深度转化目标出价">
|
|
|
|
+ <div v-if="groupTemplateId == null">无</div>
|
|
|
|
|
|
<div v-else>
|
|
<div v-else>
|
|
- {{ unitInfo.deepConversionBid/1000 }}
|
|
|
|
|
|
+ {{ unitInfo.deepConversionBid / 1000 }}
|
|
</div>
|
|
</div>
|
|
- </a-form-item>
|
|
|
|
|
|
+ </a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</a-card>
|
|
</a-card>
|
|
@@ -356,18 +358,46 @@ li.chouzhen.first:before {
|
|
</a-row>
|
|
</a-row>
|
|
<a-row>
|
|
<a-row>
|
|
<a-col :xl="14" :md="24">
|
|
<a-col :xl="14" :md="24">
|
|
- <a-form-item label="创意分类"> <!-- {{}} -->无 </a-form-item>
|
|
|
|
|
|
+ <a-form-item label="创意分类">
|
|
|
|
+ <!-- {{creativeInfo.creativeCategory}} -->
|
|
|
|
+ <a-cascader
|
|
|
|
+ :options="createOptions"
|
|
|
|
+ v-model="creativeInfo.creativeCategory"
|
|
|
|
+ :fieldNames="fieldNames"
|
|
|
|
+ placeholder="请选择创意分类"
|
|
|
|
+ disabled
|
|
|
|
+ />
|
|
|
|
+ </a-form-item>
|
|
|
|
+
|
|
|
|
+ <!-- creativeInfo.creativeCategory -->
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :xl="10" :md="24" :pull="screenWidth >= 1200 ? 4 : 0">
|
|
<a-col :xl="10" :md="24" :pull="screenWidth >= 1200 ? 4 : 0">
|
|
- <a-form-item label="封面贴纸"> 无 </a-form-item>
|
|
|
|
|
|
+ <a-form-item label="封面贴纸">
|
|
|
|
+ <a-popover
|
|
|
|
+ title="封面贴纸"
|
|
|
|
+ :overlayStyle="{ width: '400px' }"
|
|
|
|
+ placement="left"
|
|
|
|
+ v-if="creativeInfo.overlayType[0]"
|
|
|
|
+ >
|
|
|
|
+ <template slot="content">
|
|
|
|
+ <img :src="showImgUrl(creativeInfo.overlayType[0])" alt="" style="width: 100%" />
|
|
|
|
+ </template>
|
|
|
|
+ {{ creativeInfo.overlayType[0] }}
|
|
|
|
+ </a-popover>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ <!-- creativeInfo.overlayType -->
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
<a-row>
|
|
<a-row>
|
|
<a-col :xl="14" :md="24">
|
|
<a-col :xl="14" :md="24">
|
|
- <a-form-item label="创意标签"> <!-- {{}} -->无 </a-form-item>
|
|
|
|
|
|
+ <a-form-item label="创意标签">
|
|
|
|
+ {{ creativeInfo.creativeTag ? creativeInfo.creativeTag.join() : '无' }}
|
|
|
|
+ </a-form-item>
|
|
|
|
+ <!-- creativeInfo.creativeTag -->
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :xl="10" :md="24" :pull="screenWidth >= 1200 ? 4 : 0">
|
|
<a-col :xl="10" :md="24" :pull="screenWidth >= 1200 ? 4 : 0">
|
|
- <a-form-item label="行动号召"> 无 </a-form-item>
|
|
|
|
|
|
+ <a-form-item label="行动号召"> {{ creativeInfo.actionBarText }} </a-form-item>
|
|
|
|
+ <!-- creativeInfo.actionBarText -->
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</a-card>
|
|
</a-card>
|
|
@@ -933,7 +963,7 @@ li.chouzhen.first:before {
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row> -->
|
|
</a-row> -->
|
|
- <a-row :gutter="16" v-if="stickerStyles.length > 0">
|
|
|
|
|
|
+ <a-row :gutter="16" v-if="stickerStyles.length > 0" class="fengmian">
|
|
<a-col :span="16">
|
|
<a-col :span="16">
|
|
<a-form-model-item label="封面贴纸">
|
|
<a-form-model-item label="封面贴纸">
|
|
<a-checkbox-group v-model="creativeInfo.overlayType">
|
|
<a-checkbox-group v-model="creativeInfo.overlayType">
|
|
@@ -1257,7 +1287,7 @@ li.chouzhen.first:before {
|
|
v-for="(item, indexList) in materialInfo.materialList"
|
|
v-for="(item, indexList) in materialInfo.materialList"
|
|
:key="indexList"
|
|
:key="indexList"
|
|
>
|
|
>
|
|
- <a-tabs type="editable-card" hideAdd v-model="active">
|
|
|
|
|
|
+ <a-tabs type="editable-card" hideAdd v-model="item.active">
|
|
<a-tab-pane
|
|
<a-tab-pane
|
|
:tab="'创意' + (indexMater + 1)"
|
|
:tab="'创意' + (indexMater + 1)"
|
|
v-for="(items, indexMater) in item.photoArr"
|
|
v-for="(items, indexMater) in item.photoArr"
|
|
@@ -1501,8 +1531,7 @@ export default {
|
|
active: 0,
|
|
active: 0,
|
|
previewVisible: false,
|
|
previewVisible: false,
|
|
|
|
|
|
-
|
|
|
|
- targetIds:[],
|
|
|
|
|
|
+ targetIds: [],
|
|
accountId: '',
|
|
accountId: '',
|
|
directionalVisible: false, //定向包选择模态框
|
|
directionalVisible: false, //定向包选择模态框
|
|
templateList: [], //定向包模板列表
|
|
templateList: [], //定向包模板列表
|
|
@@ -1599,6 +1628,7 @@ export default {
|
|
creativeCategory: [],
|
|
creativeCategory: [],
|
|
creativeTag: [],
|
|
creativeTag: [],
|
|
stickerTitle: '',
|
|
stickerTitle: '',
|
|
|
|
+ actionBarText: '',
|
|
},
|
|
},
|
|
creativeTag: [],
|
|
creativeTag: [],
|
|
creativeRules: {
|
|
creativeRules: {
|
|
@@ -1719,6 +1749,7 @@ export default {
|
|
|
|
|
|
campaignTemplateId: null,
|
|
campaignTemplateId: null,
|
|
groupTemplateId: null,
|
|
groupTemplateId: null,
|
|
|
|
+ createTiveTemplateId: null,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -1726,6 +1757,32 @@ export default {
|
|
if (n != '') {
|
|
if (n != '') {
|
|
this.getCampaignTemplate(n)
|
|
this.getCampaignTemplate(n)
|
|
this.getGroupTemplate(n)
|
|
this.getGroupTemplate(n)
|
|
|
|
+ this.getCreativeTemplate(n)
|
|
|
|
+ this.getAction('/kuaishou/batch/getCreativeCategory', {
|
|
|
|
+ accountId: n,
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.createOptions = res.result
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.getAction('/kuaishou/batch/getCreativeWordStyles', {
|
|
|
|
+ accountId: n,
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ 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 = []
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
checkMatemalVisible(n, o) {
|
|
checkMatemalVisible(n, o) {
|
|
@@ -1811,6 +1868,7 @@ export default {
|
|
//选择素材相关
|
|
//选择素材相关
|
|
handleOkShow() {
|
|
handleOkShow() {
|
|
var arrPhotoId = []
|
|
var arrPhotoId = []
|
|
|
|
+ var count = this.materialInfo.groupCreativity == 2 ? 15 : this.materialInfo.creativityNumber
|
|
for (let i = 0; i < this.materialInfo.coverNumber; i++) {
|
|
for (let i = 0; i < this.materialInfo.coverNumber; i++) {
|
|
var data = this.checkVideo
|
|
var data = this.checkVideo
|
|
arrPhotoId = arrPhotoId.concat(data)
|
|
arrPhotoId = arrPhotoId.concat(data)
|
|
@@ -1822,7 +1880,10 @@ export default {
|
|
photoId: arrPhotoId[i],
|
|
photoId: arrPhotoId[i],
|
|
image: {},
|
|
image: {},
|
|
creativeName:
|
|
creativeName:
|
|
- '创意组' + `${Math.ceil((i + 1) / 15)}` + '-创意' + `${i > 15 ? (i % 15 == 0 ? 15 : i % 15) : i + 1}`,
|
|
|
|
|
|
+ '创意组' +
|
|
|
|
+ `${Math.ceil((i + 1) / count)}` +
|
|
|
|
+ '-创意' +
|
|
|
|
+ `${i > count ? (i % count == 0 ? count : i % count) : i + 1}`,
|
|
description: '',
|
|
description: '',
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -1834,9 +1895,9 @@ export default {
|
|
}
|
|
}
|
|
return newArr
|
|
return newArr
|
|
}
|
|
}
|
|
- var arrAll = spArray(15, arr)
|
|
|
|
|
|
+ var arrAll = spArray(count, arr)
|
|
|
|
|
|
- var dataCount = Math.ceil((this.materialInfo.coverNumber * this.checkVideo.length) / 15)
|
|
|
|
|
|
+ var dataCount = Math.ceil((this.materialInfo.coverNumber * this.checkVideo.length) / count)
|
|
|
|
|
|
this.materialInfo.materialList = []
|
|
this.materialInfo.materialList = []
|
|
for (let i = 0; i < dataCount; i++) {
|
|
for (let i = 0; i < dataCount; i++) {
|
|
@@ -1844,6 +1905,7 @@ export default {
|
|
this.materialInfo.materialList.push({
|
|
this.materialInfo.materialList.push({
|
|
name: '创意组' + (i + 1),
|
|
name: '创意组' + (i + 1),
|
|
photoArr: dataArr,
|
|
photoArr: dataArr,
|
|
|
|
+ active:0
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1853,7 +1915,10 @@ export default {
|
|
|
|
|
|
this.getImageCover(this.materialInfo.materialList[i].photoArr[j].photoId).then((res) => {
|
|
this.getImageCover(this.materialInfo.materialList[i].photoArr[j].photoId).then((res) => {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- this.materialInfo.materialList[i].photoArr[j].image = res[j % this.materialInfo.coverNumber]
|
|
|
|
|
|
+ if (res.length > 0) {
|
|
|
|
+ this.materialInfo.materialList[i].photoArr[j].image =
|
|
|
|
+ res[i % 2 == 0 ? j % this.materialInfo.coverNumber : 7 - (j % this.materialInfo.coverNumber)]
|
|
|
|
+ }
|
|
|
|
|
|
this.checkMatemalVisible = false
|
|
this.checkMatemalVisible = false
|
|
}, 100)
|
|
}, 100)
|
|
@@ -2002,9 +2067,9 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- removeTarget(templateId){
|
|
|
|
- var index = this.checkDirectionalList.findIndex(item=>item.templateId == templateId)
|
|
|
|
- this.checkDirectionalList.splice(index,1)
|
|
|
|
|
|
+ removeTarget(templateId) {
|
|
|
|
+ var index = this.checkDirectionalList.findIndex((item) => item.templateId == templateId)
|
|
|
|
+ this.checkDirectionalList.splice(index, 1)
|
|
},
|
|
},
|
|
directionalOk() {
|
|
directionalOk() {
|
|
this.checkDirectionalList = this.selectionRows
|
|
this.checkDirectionalList = this.selectionRows
|
|
@@ -2190,6 +2255,12 @@ export default {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ showImgUrl(id) {
|
|
|
|
+ var data = this.stickerStyles.filter((item) => item.id == id)[0]
|
|
|
|
+ if (data && data.url) {
|
|
|
|
+ return data.url.overlay_preview_url
|
|
|
|
+ }
|
|
|
|
+ },
|
|
showDrawerCreate() {
|
|
showDrawerCreate() {
|
|
if (this.checkAccountId()) {
|
|
if (this.checkAccountId()) {
|
|
this.creativeVisible = true
|
|
this.creativeVisible = true
|
|
@@ -2237,7 +2308,7 @@ export default {
|
|
this.dayBudgetType = '1'
|
|
this.dayBudgetType = '1'
|
|
this.unitTime = '1'
|
|
this.unitTime = '1'
|
|
this.scheduleTime = '1'
|
|
this.scheduleTime = '1'
|
|
- } else {
|
|
|
|
|
|
+ } else if (form == 'createForm') {
|
|
this.creativeVisible = false
|
|
this.creativeVisible = false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -2252,6 +2323,7 @@ export default {
|
|
}
|
|
}
|
|
var params = { ...this.unitInfo }
|
|
var params = { ...this.unitInfo }
|
|
params.id = this.groupTemplateId
|
|
params.id = this.groupTemplateId
|
|
|
|
+ params.unitType = 4
|
|
params.accountId = this.accountId
|
|
params.accountId = this.accountId
|
|
params.sceneId = this.allianceAccount == '1' ? JSON.stringify(this.unitInfo.sceneId) : JSON.stringify([5])
|
|
params.sceneId = this.allianceAccount == '1' ? JSON.stringify(this.unitInfo.sceneId) : JSON.stringify([5])
|
|
params.dayBudget = this.dayBudgetType == '1' ? null : this.unitInfo.dayBudget * 1000
|
|
params.dayBudget = this.dayBudgetType == '1' ? null : this.unitInfo.dayBudget * 1000
|
|
@@ -2284,13 +2356,19 @@ export default {
|
|
this.$refs.createForm.validate((valid) => {
|
|
this.$refs.createForm.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
var params = { ...this.creativeInfo }
|
|
var params = { ...this.creativeInfo }
|
|
|
|
+ params.id = this.createTiveTemplateId
|
|
params.accountId = this.accountId
|
|
params.accountId = this.accountId
|
|
params.overlayType = this.creativeInfo.overlayType.length > 0 ? this.creativeInfo.overlayType[0] : null
|
|
params.overlayType = this.creativeInfo.overlayType.length > 0 ? this.creativeInfo.overlayType[0] : null
|
|
|
|
+ params.creativeCategory = this.creativeInfo.creativeCategory[this.creativeInfo.creativeCategory.length - 1]
|
|
|
|
+ params.creativeTag = JSON.stringify(this.creativeInfo.creativeTag)
|
|
|
|
+ params.actionBarText = this.creativeInfo.actionBarText
|
|
|
|
+ params.stickerTitle = this.creativeInfo.overlayType.length > 0 ? this.creativeInfo.stickerTitle : null
|
|
|
|
+
|
|
// allianceAccount: '1',
|
|
// allianceAccount: '1',
|
|
// dayBudgetType: '1',
|
|
// dayBudgetType: '1',
|
|
// unitTime: '1',
|
|
// unitTime: '1',
|
|
// scheduleTime: '1',
|
|
// scheduleTime: '1',
|
|
- this.postDataAction('/template/kuaiShouBatchGroupTemplate/saveOrUpdate', params).then((res) => {
|
|
|
|
|
|
+ this.postDataAction('/template/kuaiShouBatchCreativeTemplate/saveOrUpdate', params).then((res) => {
|
|
console.log(res)
|
|
console.log(res)
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
@@ -2307,59 +2385,81 @@ export default {
|
|
onOk(value) {
|
|
onOk(value) {
|
|
console.log('onOk: ', value)
|
|
console.log('onOk: ', value)
|
|
},
|
|
},
|
|
|
|
+ getCreativeTemplate(accountId) {
|
|
|
|
+ this.getAction('/template/kuaiShouBatchCreativeTemplate/getCreativeTemplate', {
|
|
|
|
+ accountId: accountId,
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ if (res.result.id) {
|
|
|
|
+ var data = res.result
|
|
|
|
+ // params.id = this.createTiveTemplateId
|
|
|
|
+ // params.accountId = this.accountId
|
|
|
|
+ // params.overlayType = this.creativeInfo.overlayType.length > 0 ? this.creativeInfo.overlayType[0] : null
|
|
|
|
+ // params.creativeCategory = this.creativeInfo.creativeCategory[this.creativeInfo.creativeCategory.length - 1]
|
|
|
|
+ // params.creativeTag = JSON.stringify(this.creativeTag)
|
|
|
|
+ // params.actionBarText = this.creativeInfo.actionBarText
|
|
|
|
+ // params.stickerTitle = this.creativeInfo.overlayType.length > 0 ? this.creativeInfo.stickerTitle : null
|
|
|
|
+ this.createTiveTemplateId = data.id
|
|
|
|
+ this.creativeInfo.overlayType = data.overlayType ? [+data.overlayType] : []
|
|
|
|
+ this.creativeInfo.creativeCategory = data.creativeCategory
|
|
|
|
+ ? [
|
|
|
|
+ +(data.creativeCategory + '').substring(0, 1),
|
|
|
|
+ +(data.creativeCategory + '').substring(0, 3),
|
|
|
|
+ data.creativeCategory,
|
|
|
|
+ ]
|
|
|
|
+ : []
|
|
|
|
+ this.creativeInfo.creativeTag = data.creativeTag ? JSON.parse(data.creativeTag) : []
|
|
|
|
+ this.creativeInfo.actionBarText = data.actionBarText
|
|
|
|
+ this.creativeInfo.stickerTitle = data.stickerTitle
|
|
|
|
+ // allianceAccount: '1',
|
|
|
|
+ // dayBudgetType: '1',
|
|
|
|
+ // unitTime: '1',
|
|
|
|
+ // scheduleTime: '1',
|
|
|
|
+ } else {
|
|
|
|
+ this.closeUnit('createForm')
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
getGroupTemplate(accountId) {
|
|
getGroupTemplate(accountId) {
|
|
this.getAction('/template/kuaiShouBatchGroupTemplate/getGroupTemplate', {
|
|
this.getAction('/template/kuaiShouBatchGroupTemplate/getGroupTemplate', {
|
|
accountId: accountId,
|
|
accountId: accountId,
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
- var str = ''
|
|
|
|
- for (let i = 0; i < 7 * 24; i++) {
|
|
|
|
- str += '0'
|
|
|
|
|
|
+ if (res.result.id) {
|
|
|
|
+ var str = ''
|
|
|
|
+ for (let i = 0; i < 7 * 24; i++) {
|
|
|
|
+ str += '0'
|
|
|
|
+ }
|
|
|
|
+ var data = res.result
|
|
|
|
+ this.groupTemplateId = data.id
|
|
|
|
+ this.unitInfo.useAppMarket = data.useAppMarket == 1 ? true : false
|
|
|
|
+ this.unitInfo.appStore = data.appStore ? JSON.parse(data.appStore) : []
|
|
|
|
+ this.dayBudgetType = data.dayBudget ? '2' : '1'
|
|
|
|
+ this.unitInfo.dayBudget = data.dayBudget ? data.dayBudget / 1000 : null
|
|
|
|
+ this.unitInfo.speed = data.speed + ''
|
|
|
|
+ this.unitTime = data.endTime ? '2' : '1'
|
|
|
|
+ this.unitInfo.timeRange = data.endTime
|
|
|
|
+ ? [moment().startOf('day'), moment().add(1, 'months')]
|
|
|
|
+ : [moment().startOf('day'), moment().add(1, 'months')]
|
|
|
|
+ this.scheduleTime = data.scheduleTime == null || data.scheduleTime == str ? '1' : '2'
|
|
|
|
+ this.unitInfo.scheduleTime = data.scheduleTime == null || data.scheduleTime == str ? str : data.scheduleTime
|
|
|
|
+ this.unitInfo.showMode = data.showMode + ''
|
|
|
|
+ this.unitInfo.sceneId = JSON.parse(data.sceneId)[0] == 5 ? [1] : JSON.parse(data.sceneId)
|
|
|
|
+ this.allianceAccount = JSON.parse(data.sceneId)[0] == 5 ? '2' : '1'
|
|
|
|
+ this.unitInfo.bidType = data.bidType
|
|
|
|
+ this.unitInfo.ocpxActionType = data.ocpxActionType ? data.ocpxActionType : 2
|
|
|
|
+ this.unitInfo.deepConversionType = data.deepConversionType
|
|
|
|
+ this.unitInfo.templateBidType = data.templateBidType
|
|
|
|
+ this.unitInfo.cpaBid = data.cpaBid
|
|
|
|
+ this.unitInfo.bid = data.bid
|
|
|
|
+ this.unitInfo.deepConversionBid = data.deepConversionBid
|
|
|
|
+ this.unitInfo.bidMax = data.bidMax
|
|
|
|
+ this.unitInfo.bidMin = data.bidMin
|
|
|
|
+ this.unitInfo.unitName = data.unitName
|
|
|
|
+ } else {
|
|
|
|
+ this.closeUnit('ruleForm')
|
|
}
|
|
}
|
|
- var data = res.result
|
|
|
|
- this.groupTemplateId = data.id
|
|
|
|
- this.unitInfo.useAppMarket = data.useAppMarket == 1 ? true : false
|
|
|
|
- this.unitInfo.appStore = data.appStore ? JSON.parse(data.appStore) : []
|
|
|
|
- this.dayBudgetType = data.dayBudget ? '2' : '1'
|
|
|
|
- this.unitInfo.dayBudget = data.dayBudget ? data.dayBudget / 1000 : null
|
|
|
|
- this.unitInfo.speed = data.speed + ''
|
|
|
|
- this.unitTime = data.endTime ? '2' : '1'
|
|
|
|
- this.unitInfo.timeRange = data.endTime
|
|
|
|
- ? [moment().startOf('day'), moment().add(1, 'months')]
|
|
|
|
- : [moment().startOf('day'), moment().add(1, 'months')]
|
|
|
|
- this.scheduleTime = data.scheduleTime == null || data.scheduleTime == str ? '1' : '2'
|
|
|
|
- this.unitInfo.scheduleTime = data.scheduleTime == null || data.scheduleTime == str ? str : data.scheduleTime
|
|
|
|
- this.unitInfo.showMode = data.showMode + ''
|
|
|
|
- this.unitInfo.sceneId = JSON.parse(data.sceneId)[0] == 5 ? [1] : JSON.parse(data.sceneId)
|
|
|
|
- this.allianceAccount = JSON.parse(data.sceneId)[0] == 5 ? '2' : '1'
|
|
|
|
- this.unitInfo.bidType = data.bidType
|
|
|
|
- this.unitInfo.ocpxActionType = data.ocpxActionType ? data.ocpxActionType : 2
|
|
|
|
- this.unitInfo.deepConversionType = data.deepConversionType
|
|
|
|
- this.unitInfo.templateBidType = data.templateBidType
|
|
|
|
- this.unitInfo.cpaBid = data.cpaBid
|
|
|
|
- this.unitInfo.bid = data.bid
|
|
|
|
- this.unitInfo.deepConversionBid = data.deepConversionBid
|
|
|
|
- this.unitInfo.bidMax = data.bidMax
|
|
|
|
- this.unitInfo.bidMin = data.bidMin
|
|
|
|
- this.unitInfo.unitName = data.unitName
|
|
|
|
- // showMode: '2',
|
|
|
|
- // sceneId: [1],
|
|
|
|
- // bidType: 10,
|
|
|
|
- // ocpxActionType: 2,
|
|
|
|
- // deepConversionType: null,
|
|
|
|
- // templateBidType: 1,
|
|
|
|
- // cpaBid: null,
|
|
|
|
- // bid: null,
|
|
|
|
- // deepConversionBid: null,
|
|
|
|
- // bidMax: null,
|
|
|
|
- // bidMin: null,
|
|
|
|
- // unitName: '',
|
|
|
|
- // // 'huawei', 'oppo', 'vivo', 'xiaomi', 'meizu', 'smartisan'
|
|
|
|
- // },
|
|
|
|
- // allianceAccount: '1',
|
|
|
|
-
|
|
|
|
- // scheduleTime: '1',
|
|
|
|
- console.log(res)
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -2367,22 +2467,28 @@ export default {
|
|
this.getAction('/template/kuaiShouBatchCampaignTemplate/getCampaignTemplate', {
|
|
this.getAction('/template/kuaiShouBatchCampaignTemplate/getCampaignTemplate', {
|
|
accountId: accountId,
|
|
accountId: accountId,
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
- this.campaignTemplateId = res.result.id
|
|
|
|
- this.campaignData = res.result
|
|
|
|
- if (this.campaignData.timeStart) {
|
|
|
|
- this.campaignData.timeStart = moment(this.campaignData.timeStart)
|
|
|
|
- }
|
|
|
|
- if (this.campaignData.dayBudget) {
|
|
|
|
- this.campaignData.budgetType = '2'
|
|
|
|
- this.campaignData.dayBudget = res.result.dayBudget / 1000
|
|
|
|
|
|
+ if (res.success) {
|
|
|
|
+ if (res.result.id) {
|
|
|
|
+ this.campaignTemplateId = res.result.id
|
|
|
|
+ this.campaignData = res.result
|
|
|
|
+ if (this.campaignData.timeStart) {
|
|
|
|
+ this.campaignData.timeStart = moment(this.campaignData.timeStart)
|
|
|
|
+ }
|
|
|
|
+ if (this.campaignData.dayBudget) {
|
|
|
|
+ this.campaignData.budgetType = '2'
|
|
|
|
+ this.campaignData.dayBudget = res.result.dayBudget / 1000
|
|
|
|
+ }
|
|
|
|
+ var that = this
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ var mdl = Object.assign({}, that.campaignData)
|
|
|
|
+ that.$nextTick(() => {
|
|
|
|
+ that.form.setFieldsValue(pick(mdl, ['campaignType']))
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.form.resetFields()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- var that = this
|
|
|
|
- setTimeout(() => {
|
|
|
|
- var mdl = Object.assign({}, that.campaignData)
|
|
|
|
- that.$nextTick(() => {
|
|
|
|
- that.form.setFieldsValue(pick(mdl, ['campaignType']))
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
})
|
|
})
|
|
},
|
|
},
|
|
ruleConfigFormOk(e) {
|
|
ruleConfigFormOk(e) {
|