|
@@ -21,27 +21,39 @@
|
|
|
>
|
|
|
</acount-search>
|
|
|
</a-form-model-item>
|
|
|
- <a-form-model-item label="dp链接范围" class="dp-link-start" prop="dpLinkStartIndex">
|
|
|
- <a-input-number
|
|
|
- class="common-input"
|
|
|
- v-model="configForm.dpLinkStartIndex"
|
|
|
- :disabled="modalTitle === 'edit'"
|
|
|
- :min="1"
|
|
|
- placeholder="请输入"
|
|
|
- @change="handleDplinkStart"
|
|
|
- />
|
|
|
- <span>~</span>
|
|
|
- </a-form-model-item>
|
|
|
- <a-form-model-item class="dp-link-end" prop="dpLinkEndIndex">
|
|
|
- <a-input-number
|
|
|
- class="common-input"
|
|
|
- v-model="configForm.dpLinkEndIndex"
|
|
|
- :disabled="modalTitle === 'edit'"
|
|
|
- :min="getEndIndex"
|
|
|
- placeholder="请输入"
|
|
|
- @change="handleDplinkEnd"
|
|
|
- />
|
|
|
+ <a-form-model-item label="dp链接">
|
|
|
+ <a-radio-group
|
|
|
+ v-model="configForm.dpLinkIndexUsed"
|
|
|
+ button-style="solid"
|
|
|
+ @change="handleDpLinkIndexUsed"
|
|
|
+ >
|
|
|
+ <a-radio-button :value="0">关闭</a-radio-button>
|
|
|
+ <a-radio-button :value="1">开启</a-radio-button>
|
|
|
+ </a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
+ <div v-if="configForm.dpLinkIndexUsed === 1">
|
|
|
+ <a-form-model-item label="dp链接范围" class="dp-link-start" prop="dpLinkStartIndex">
|
|
|
+ <a-input-number
|
|
|
+ class="common-input"
|
|
|
+ v-model="configForm.dpLinkStartIndex"
|
|
|
+ :disabled="modalTitle === 'edit'"
|
|
|
+ :min="1"
|
|
|
+ placeholder="请输入"
|
|
|
+ @change="handleDplinkStart"
|
|
|
+ />
|
|
|
+ <span>~</span>
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item class="dp-link-end" prop="dpLinkEndIndex">
|
|
|
+ <a-input-number
|
|
|
+ class="common-input"
|
|
|
+ v-model="configForm.dpLinkEndIndex"
|
|
|
+ :disabled="modalTitle === 'edit'"
|
|
|
+ :min="getEndIndex"
|
|
|
+ placeholder="请输入"
|
|
|
+ @change="handleDplinkEnd"
|
|
|
+ />
|
|
|
+ </a-form-model-item>
|
|
|
+ </div>
|
|
|
<a-form-model-item label="预算方式">
|
|
|
<a-radio-group
|
|
|
v-model="configForm.accountBudgetMode"
|
|
@@ -108,7 +120,7 @@
|
|
|
</div>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="创建数量: 广告组数量" class="campaign-cnt-class" prop="campaignCnt">
|
|
|
- <a-input-number v-model="configForm.campaignCnt" :min="1" @change="handleCampaignCnt"/>
|
|
|
+ <a-input-number v-model="configForm.campaignCnt" :min="1" @change="handleCampaignCnt" :disabled="configForm.dpLinkIndexUsed === 0"/>
|
|
|
<a-tooltip placement="top">
|
|
|
<template slot="title">
|
|
|
<span>输入的数量为每天所创建的广告组数量</span>
|
|
@@ -247,6 +259,8 @@
|
|
|
<a-checkbox :style="radioStyle" value="INVENTORY_HOTSOON_FEED">抖音火山版</a-checkbox>
|
|
|
<a-checkbox :style="radioStyle" value="INVENTORY_AWEME_FEED">抖音短视频</a-checkbox>
|
|
|
<a-checkbox :style="radioStyle" value="INVENTORY_UNION_SLOT">穿山甲</a-checkbox>
|
|
|
+ <a-checkbox :style="radioStyle" value="UNION_BOUTIQUE_GAME">ohayoo精品游戏</a-checkbox>
|
|
|
+ <a-checkbox :style="radioStyle" value="INVENTORY_TOMATO_NOVEL">番茄小说</a-checkbox>
|
|
|
</a-checkbox-group>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -296,25 +310,26 @@
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item v-if="configForm.customPerson === 'a'" label="定向逻辑">
|
|
|
- <a-radio-group v-model="configForm.directionalLogic" button-style="solid" @change="handleDirectionalLogic">
|
|
|
+ <!-- adRetargetingTagsType -->
|
|
|
+ <a-radio-group v-model="configForm.adRetargetingTagsType" button-style="solid" @change="handleDirectionalLogic">
|
|
|
<a-radio-button value="1">定向</a-radio-button>
|
|
|
<a-radio-button value="2">排除</a-radio-button>
|
|
|
<a-radio-button value="3">同时定向排除</a-radio-button>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
- <div v-if="configForm.customPerson === 'a' && configForm.directionalLogic === '1'" class="adver-position-radio">
|
|
|
+ <div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '1'" class="adver-position-radio">
|
|
|
<div style="width: 60%;">
|
|
|
- <directional-logic ref="direct" packtype="directional" multitype="alone" :defaultlist="directionalData" :updatelistinclude="configForm.updateGetingInclude" @selection-alone-event="handleSelectionAloneEvent"></directional-logic>
|
|
|
+ <directional-logic ref="direct" packtype="directional" multitype="alone" :defaultlist="directionalData" :valueids="configForm.adRetargetingTagsType" :updatelistinclude="configForm.updateGetingInclude" @selection-alone-event="handleSelectionAloneEvent"></directional-logic>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="configForm.customPerson === 'a' && configForm.directionalLogic === '2'" class="adver-position-radio">
|
|
|
+ <div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '2'" class="adver-position-radio">
|
|
|
<div style="width: 60%;">
|
|
|
- <directional-logic ref="exclude" packtype="exclude" multitype="alone" :defaultlist="directionalData" :updatelistexclude="configForm.updateGetingExclude" @selection-alone-event="handleSelectionAloneEvent"></directional-logic>
|
|
|
+ <directional-logic ref="exclude" packtype="exclude" multitype="alone" :defaultlist="directionalData" :valueids="configForm.adRetargetingTagsType" :updatelistexclude="configForm.updateGetingExclude" @selection-alone-event="handleSelectionAloneEvent"></directional-logic>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="configForm.customPerson === 'a' && configForm.directionalLogic === '3'" class="adver-position-radio">
|
|
|
+ <div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '3'" class="adver-position-radio">
|
|
|
<div style="width: 60%;">
|
|
|
- <directional-logic ref="twoway" packtype="twoway" multitype="all" :defaultlist="directionalData" :updatelistinclude="configForm.updateGetingInclude" :updatelistexclude="configForm.updateGetingExclude" @selection-direct-event="handleDirectEvent" @selection-exclude-event="handleExcludeEvent"></directional-logic>
|
|
|
+ <directional-logic ref="twoway" packtype="twoway" multitype="all" :defaultlist="directionalData" :valueids="configForm.adRetargetingTagsType" :updatelistinclude="configForm.updateGetingInclude" :updatelistexclude="configForm.updateGetingExclude" @selection-direct-event="handleDirectEvent" @selection-exclude-event="handleExcludeEvent"></directional-logic>
|
|
|
</div>
|
|
|
</div>
|
|
|
<a-form-model-item label="媒体定向">
|
|
@@ -326,12 +341,15 @@
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="平台">
|
|
|
<a-radio-group v-model="configForm.adPlatform" button-style="solid">
|
|
|
- <a-radio-button value="NONE" :disabled="!!configForm.adDownloadUrl">不限</a-radio-button>
|
|
|
- <a-radio-button value="IOS" :disabled="!!configForm.adDownloadUrl">IOS</a-radio-button>
|
|
|
- <a-radio-button value="ANDROID">Andriod</a-radio-button>
|
|
|
- <a-radio-button value="PC" :disabled="!!configForm.adDownloadUrl">PC</a-radio-button>
|
|
|
+ <a-radio-button value="NONE" :disabled="platformLoadingType === 'APP_IOS' || platformLoadingType === 'APP_ANDROID'">不限</a-radio-button>
|
|
|
+ <a-radio-button value="IOS" :disabled="platformLoadingType === 'APP_ANDROID'">IOS</a-radio-button>
|
|
|
+ <a-radio-button value="ANDROID" :disabled="platformLoadingType === 'APP_IOS'">Andriod</a-radio-button>
|
|
|
+ <a-radio-button value="PC" :disabled="platformLoadingType === 'APP_IOS' || platformLoadingType === 'APP_ANDROID'">PC</a-radio-button>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
+ <a-form-model-item label="设备类型">
|
|
|
+ <radio-check v-model="configForm.adDeviceSelectType" :options="deviceTypeList" @change="getAgeSelect"></radio-check>
|
|
|
+ </a-form-model-item>
|
|
|
<a-form-model-item v-if="configForm.adDownloadUrl" label="安卓版本">
|
|
|
<a-radio-group v-model="configForm.adAndroidVersion" button-style="solid" @change="handleAndroidVersion">
|
|
|
<a-radio-button value="NONE">不限</a-radio-button>
|
|
@@ -386,8 +404,8 @@
|
|
|
class="common-input-long"
|
|
|
v-model="configForm.adAudiencePackageId"
|
|
|
allow-clear
|
|
|
- :placeholder="selectOrientPlaceholder"
|
|
|
- :disabled="selectOrientPlaceholder !== '请选择已有定向包名称'"
|
|
|
+ placeholder="请选择已有定向包名称"
|
|
|
+ :disabled="selectOrientPlaceholder !== 'able'"
|
|
|
@change="handleSelectiveOrientation"
|
|
|
>
|
|
|
<a-select-option
|
|
@@ -398,6 +416,9 @@
|
|
|
{{ item.name }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
+ <span style="margin-left: 20px;">
|
|
|
+ <a-button :disabled="selectOrientPlaceholder !== 'able'" type="primary" @click="handleAsyncPackage">同步定向包</a-button>
|
|
|
+ </span>
|
|
|
<a-tooltip placement="top">
|
|
|
<template slot="title">
|
|
|
<span>已有定向包只展示当前推广目的和投放范围下,定向功能升级后仍可用的定向包</span>
|
|
@@ -405,6 +426,7 @@
|
|
|
<a-icon class="form-itrm-icon orientation-icon" type="smile-o"/>
|
|
|
</a-tooltip>
|
|
|
</a-form-model-item>
|
|
|
+ <span v-if="selectOrientPlaceholder !== 'able'" style="color: #f00; margin-left: 198px;">{{ selectOrientPlaceholder }}</span>
|
|
|
<div class="select-orientation-content">
|
|
|
<p class="orientation-header-title">已选定向信息</p>
|
|
|
<div v-if="packageMessageDetail.length" class="orientation-content-substance">
|
|
@@ -610,7 +632,6 @@
|
|
|
class="avatar-uploader"
|
|
|
:show-upload-list="false"
|
|
|
:before-upload="beforeUpload"
|
|
|
- @change="handleChange"
|
|
|
>
|
|
|
<div v-if="imageUrl" class="upload-img-class" @mouseover="handleChangeActive">
|
|
|
<div class="img-flex-url">
|
|
@@ -621,7 +642,7 @@
|
|
|
<a-icon class="delete-icon-class" type="delete" @click.stop="handleDeleteImg"/>
|
|
|
</div> -->
|
|
|
</div>
|
|
|
- <div v-if="!imageUrl && !isCoverImgDiv">
|
|
|
+ <div v-else>
|
|
|
<a-icon type="plus" style="margin-top: 10px;"/>
|
|
|
<div class="ant-upload-text">Upload</div>
|
|
|
</div>
|
|
@@ -825,6 +846,20 @@ export default {
|
|
|
directionalData: [],
|
|
|
platformLoadingType: '',
|
|
|
selectPackageTabs: '1',
|
|
|
+ deviceTypeList: [
|
|
|
+ {
|
|
|
+ value: 'NONE',
|
|
|
+ label: '不限'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'MOBILE',
|
|
|
+ label: '智能手机'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'PAD',
|
|
|
+ label: '平板'
|
|
|
+ }
|
|
|
+ ],
|
|
|
adAcList: [
|
|
|
{
|
|
|
value: 'NONE',
|
|
@@ -894,7 +929,7 @@ export default {
|
|
|
md5Result: '',
|
|
|
urlResult: '',
|
|
|
createOptions: [],
|
|
|
- adNameTags: ['出价方式', '素材名称', '日期', 'dp链接标识', '创意方式'],
|
|
|
+ adNameTags: ['出价方式', '素材名称', '日期', '创意方式'],
|
|
|
fieldNames: {
|
|
|
label: 'industryName',
|
|
|
value: 'industryId',
|
|
@@ -1003,7 +1038,8 @@ export default {
|
|
|
creativeThirdIndustryIds: [{required: true, message: '请选择', trigger: 'change'}]
|
|
|
},
|
|
|
configForm: {
|
|
|
- directionalLogic: '1',
|
|
|
+ dpLinkIndexUsed: 0,
|
|
|
+ adRetargetingTagsType: '1',
|
|
|
adAudiencePackageId: undefined,
|
|
|
adStepBid: 0,
|
|
|
ladderOne: '',
|
|
@@ -1048,6 +1084,7 @@ export default {
|
|
|
customPerson: 'NONE', // 定向-自定义
|
|
|
adSuperiorPopularityType: 'NONE', // 定向-媒体定向
|
|
|
adPlatform: 'NONE', // 定向-平台
|
|
|
+ adDeviceSelectType: ['NONE'],
|
|
|
adSelectAc: ['NONE'],
|
|
|
adAc: '', // 定向-网络
|
|
|
adHideIfExists: '0', // 定向-已安装用户
|
|
@@ -1083,7 +1120,18 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
selectOrientPlaceholder() {
|
|
|
- return this.configForm.accountId ? '请选择已有定向包名称' : '请选择广告账户';
|
|
|
+ if (!this.configForm.accountId) {
|
|
|
+ return '请选择账户';
|
|
|
+ }
|
|
|
+ else if (this.configForm.adDownloadType === 'DOWNLOAD_URL' && !this.platformLoadingType) {
|
|
|
+ return '请填写投放内容';
|
|
|
+ }
|
|
|
+ else if (this.configForm.adDownloadType === 'EXTERNAL_URL' && !this.configForm.adExternalUrl) {
|
|
|
+ return '请填写投放内容';
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return 'able';
|
|
|
+ }
|
|
|
},
|
|
|
getEndIndex() {
|
|
|
return Number(this.configForm.dpLinkStartIndex) + 1;
|
|
@@ -1115,6 +1163,7 @@ export default {
|
|
|
promotionContent: this.configForm.adDownloadType
|
|
|
};
|
|
|
this.handleGetOptimizationObjective(paramsData);
|
|
|
+ this.handleGetAdAudiencePackage();
|
|
|
}
|
|
|
},
|
|
|
NewAdPackage(newVal, oldVal) {
|
|
@@ -1180,6 +1229,23 @@ export default {
|
|
|
methods: {
|
|
|
...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
|
moment,
|
|
|
+ handleAsyncPackage() {
|
|
|
+ this.handleGetAdAudiencePackage();
|
|
|
+ this.configForm.adAudiencePackageId = undefined;
|
|
|
+ this.packageMessageDetail = [];
|
|
|
+ },
|
|
|
+ handleDpLinkIndexUsed(e) {
|
|
|
+ const defaultId = e.target.value;
|
|
|
+ if (defaultId === 0) {
|
|
|
+ this.adNameTags.pop();
|
|
|
+ this.configForm.dpLinkStartIndex = 1;
|
|
|
+ this.configForm.dpLinkEndIndex = 2;
|
|
|
+ this.configForm.campaignCnt = 1;
|
|
|
+ }
|
|
|
+ else if (defaultId === 1) {
|
|
|
+ this.adNameTags.push('dp链接标识');
|
|
|
+ }
|
|
|
+ },
|
|
|
handleDplinkStart(e) {
|
|
|
this.configForm.dpLinkStartIndex = Math.round(e);
|
|
|
},
|
|
@@ -1195,7 +1261,6 @@ export default {
|
|
|
};
|
|
|
getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getDMPCustomAudience', paramsData).then(result => {
|
|
|
if (result.code === 0) {
|
|
|
- console.log(result, 'result--8888888888888888888888888888888-result');
|
|
|
result.result.forEach(item => {
|
|
|
item.key = item.custom_audience_id;
|
|
|
});
|
|
@@ -1209,13 +1274,13 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleSelectionAloneEvent(list) {
|
|
|
- if (this.configForm.directionalLogic === '1') {
|
|
|
+ if (this.configForm.adRetargetingTagsType === '1') {
|
|
|
this.configForm.updateGetingInclude = list;
|
|
|
this.configForm.adRetargetingTagsInclude = list && list.join(',');
|
|
|
this.configForm.adRetargetingTagsExclude = '';
|
|
|
this.configForm.updateGetingExclude = [];
|
|
|
}
|
|
|
- else if (this.configForm.directionalLogic === '2') {
|
|
|
+ else if (this.configForm.adRetargetingTagsType === '2') {
|
|
|
this.configForm.updateGetingExclude = list;
|
|
|
this.configForm.adRetargetingTagsExclude = list && list.join(',');
|
|
|
this.configForm.updateGetingInclude = [];
|
|
@@ -1223,10 +1288,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleDirectEvent(list) {
|
|
|
+ console.log(list, 'list--list--Include');
|
|
|
this.configForm.updateGetingInclude = list;
|
|
|
this.configForm.adRetargetingTagsInclude = list && list.join(',');
|
|
|
},
|
|
|
handleExcludeEvent(list) {
|
|
|
+ console.log(list, 'list--list--Exclude');
|
|
|
this.configForm.updateGetingExclude = list;
|
|
|
this.configForm.adRetargetingTagsExclude = list && list.join(',');
|
|
|
},
|
|
@@ -1235,9 +1302,13 @@ export default {
|
|
|
this.handleDirectionalList();
|
|
|
if (selectValue === '1') {
|
|
|
this.$refs.exclude.aloneInput = '';
|
|
|
+ this.$refs.twoway.directInput = '';
|
|
|
+ this.$refs.twoway.excludeInput = '';
|
|
|
}
|
|
|
else if (selectValue === '2') {
|
|
|
this.$refs.direct.aloneInput = '';
|
|
|
+ this.$refs.twoway.directInput = '';
|
|
|
+ this.$refs.twoway.excludeInput = '';
|
|
|
}
|
|
|
else if (selectValue === '3') {
|
|
|
this.$refs.direct.aloneInput = '';
|
|
@@ -1398,9 +1469,12 @@ export default {
|
|
|
if (result.code === 0) {
|
|
|
this.configForm.adPackage = result.result.package || '';
|
|
|
this.platformLoadingType = result.result.platform || '';
|
|
|
- // if (result.result.platform === '') {
|
|
|
-
|
|
|
- // }
|
|
|
+ if (result.result.platform && result.result.platform === 'APP_ANDROID') {
|
|
|
+ this.configForm.adPlatform = 'ANDROID';
|
|
|
+ }
|
|
|
+ else if (result.result.platform && result.result.platform === 'APP_IOS') {
|
|
|
+ this.configForm.adPlatform = 'IOS';
|
|
|
+ }
|
|
|
}
|
|
|
else {
|
|
|
this.$message.error(result.message);
|
|
@@ -1442,21 +1516,18 @@ export default {
|
|
|
},
|
|
|
handleAdDownLoadType(e) {
|
|
|
this.optimizationOption = [];
|
|
|
- if (e.target.value === 'DOWNLOAD_URL') {
|
|
|
- this.configForm.adExternalUrl = undefined;
|
|
|
- this.configForm.adOpenUrl = undefined;
|
|
|
- this.configForm.adConvertId = undefined;
|
|
|
- this.$refs['ruleForm'].clearValidate(['adDownloadUrl']);
|
|
|
- this.$refs['ruleForm'].clearValidate(['adPackage']);
|
|
|
- }
|
|
|
- else if (e.target.value === 'EXTERNAL_URL') {
|
|
|
- console.log(this.configForm.adDownloadUrl, this.configForm.adPackage, '[][][][][][][]]][]][][]]][]');
|
|
|
- this.configForm.adExternalUrl = undefined;
|
|
|
- this.configForm.adDownloadUrl = undefined;
|
|
|
- this.configForm.adPackage = undefined;
|
|
|
- this.configForm.adConvertId = undefined;
|
|
|
- this.configForm.adOpenUrl = undefined;
|
|
|
- this.$refs['ruleForm'].clearValidate(['adExternalUrl']);
|
|
|
+ const defaultValue = e.target.value;
|
|
|
+ if (defaultValue === 'DOWNLOAD_URL') {
|
|
|
+ this.configForm.adExternalUrl = '';
|
|
|
+ this.configForm.adOpenUrl = '';
|
|
|
+ this.$refs.ruleForm.clearValidate(['adExternalUrl']);
|
|
|
+ }
|
|
|
+ else if (defaultValue === 'EXTERNAL_URL') {
|
|
|
+ this.configForm.adDownloadUrl = '';
|
|
|
+ this.configForm.adPackage = '';
|
|
|
+ this.configForm.adConvertId = '';
|
|
|
+ this.$refs.ruleForm.clearValidate(['adDownloadUrl']);
|
|
|
+ this.$refs.ruleForm.clearValidate(['adPackage']);
|
|
|
}
|
|
|
},
|
|
|
handleCampaignCnt(e) {
|
|
@@ -1515,6 +1586,7 @@ export default {
|
|
|
this.configForm.campaignLandingType = detailData.campaignLandingType;
|
|
|
this.configForm.advertisingType = detailData.advertisingType || '1';
|
|
|
this.configForm.campaignName = detailData.campaignName || '';
|
|
|
+ this.configForm.dpLinkIndexUsed = detailData.dpLinkIndexUsed;
|
|
|
this.configForm.adName = detailData.adName || '';
|
|
|
this.configForm.campaignCnt = detailData.campaignCnt || '';
|
|
|
this.configForm.campaignAdCnt = detailData.campaignAdCnt || '';
|
|
@@ -1532,36 +1604,32 @@ export default {
|
|
|
}, 200);
|
|
|
getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getDMPCustomAudience', {accountId: detailData.accountId}).then(result => {
|
|
|
if (result.code === 0) {
|
|
|
- console.log(result, 'result--8888888888888888888888888888888-result');
|
|
|
result.result.forEach(item => {
|
|
|
item.key = item.custom_audience_id;
|
|
|
});
|
|
|
this.directionalData = result.result;
|
|
|
- if (detailData.adRetargetingTagsInclude && detailData.adRetargetingTagsExclude) {
|
|
|
+ this.configForm.adRetargetingTagsType = detailData.adRetargetingTagsType || '1';
|
|
|
+ if (detailData.adRetargetingTagsType === '3') {
|
|
|
this.configForm.customPerson = 'a';
|
|
|
- this.configForm.directionalLogic = '3';
|
|
|
this.configForm.adRetargetingTagsInclude = detailData.adRetargetingTagsInclude;
|
|
|
this.configForm.adRetargetingTagsExclude = detailData.adRetargetingTagsExclude;
|
|
|
+ this.configForm.updateGetingExclude = detailData.adRetargetingTagsExclude ? detailData.adRetargetingTagsExclude.split(',').map(item => Number(item)) : [];
|
|
|
+ this.configForm.updateGetingInclude = detailData.adRetargetingTagsInclude ? detailData.adRetargetingTagsInclude.split(',').map(item => Number(item)) : [];
|
|
|
+ }
|
|
|
+ else if (detailData.adRetargetingTagsType === '2') {
|
|
|
+ this.configForm.customPerson = 'a';
|
|
|
+ this.configForm.adRetargetingTagsExclude = detailData.adRetargetingTagsExclude;
|
|
|
this.configForm.updateGetingExclude = detailData.adRetargetingTagsExclude.split(',').map(item => Number(item));
|
|
|
- this.configForm.updateGetingInclude = detailData.adRetargetingTagsInclude.split(',').map(item => Number(item));
|
|
|
+ this.configForm.updateGetingInclude = [];
|
|
|
}
|
|
|
- else if (detailData.adRetargetingTagsInclude && !detailData.adRetargetingTagsExclude) {
|
|
|
+ else if (detailData.adRetargetingTagsType === '1') {
|
|
|
this.configForm.customPerson = 'a';
|
|
|
- this.configForm.directionalLogic = '1';
|
|
|
this.configForm.adRetargetingTagsInclude = detailData.adRetargetingTagsInclude;
|
|
|
this.configForm.updateGetingExclude = [];
|
|
|
this.configForm.updateGetingInclude = detailData.adRetargetingTagsInclude.split(',').map(item => Number(item));
|
|
|
}
|
|
|
- else if (!detailData.adRetargetingTagsInclude && detailData.adRetargetingTagsExclude) {
|
|
|
- this.configForm.customPerson = 'a';
|
|
|
- this.configForm.directionalLogic = '2';
|
|
|
- this.configForm.adRetargetingTagsExclude = detailData.adRetargetingTagsExclude;
|
|
|
- this.configForm.updateGetingExclude = detailData.adRetargetingTagsExclude.split(',').map(item => Number(item));
|
|
|
- this.configForm.updateGetingInclude = [];
|
|
|
- }
|
|
|
else {
|
|
|
this.configForm.customPerson = 'NONE';
|
|
|
- this.configForm.directionalLogic = '1';
|
|
|
this.configForm.adRetargetingTagsExclude = '';
|
|
|
this.configForm.updateGetingExclude = '';
|
|
|
this.configForm.updateGetingInclude = [];
|
|
@@ -1578,6 +1646,7 @@ export default {
|
|
|
this.configForm.adLocationType = detailData.adLocationType;
|
|
|
this.configForm.adSelectAge = detailData.adAge.split(',');
|
|
|
this.configForm.adSelectAc = detailData.adAc.split(',');
|
|
|
+ this.configForm.adDeviceSelectType = detailData.adDeviceType.split(',');
|
|
|
this.configForm.adSuperiorPopularityType = detailData.adSuperiorPopularityType;
|
|
|
this.configForm.adPlatform = detailData.adPlatform;
|
|
|
this.configForm.adAc = detailData.adAc;
|
|
@@ -1611,6 +1680,7 @@ export default {
|
|
|
this.imageUrl = detailData.imageUrl;
|
|
|
this.urlResult = detailData.imageUrl;
|
|
|
this.md5Result = detailData.creativeProductImageCode;
|
|
|
+ this.handleGetPackage();
|
|
|
if (detailData.adAndroidOsv !== 'NONE') {
|
|
|
this.configForm.adAndroidVersion = 'a';
|
|
|
this.configForm.androidChangeValue = detailData.adAndroidOsv;
|
|
@@ -1809,7 +1879,6 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleDownloadLink(e) {
|
|
|
- this.configForm.adPlatform = e.target.value ? 'ANDROID' : 'NONE';
|
|
|
this.handleGetPackage();
|
|
|
},
|
|
|
handleDeleteImg() {
|
|
@@ -1832,10 +1901,16 @@ export default {
|
|
|
const fileOvesize = info.size > (1024 * 1024);
|
|
|
if (!isZip) {
|
|
|
this.$message.error('请上传正确类型的图片');
|
|
|
+ this.imageUrl = '';
|
|
|
+ this.urlResult = '';
|
|
|
+ this.md5Result = '';
|
|
|
return;
|
|
|
}
|
|
|
if (fileOvesize) {
|
|
|
this.$message.error('图片大小不能超过1M');
|
|
|
+ this.imageUrl = '';
|
|
|
+ this.urlResult = '';
|
|
|
+ this.md5Result = '';
|
|
|
return;
|
|
|
}
|
|
|
new Promise(function (resolve, reject) {
|
|
@@ -1850,16 +1925,17 @@ export default {
|
|
|
img.src = _URL.createObjectURL(info);
|
|
|
}).then(() => {
|
|
|
this.handleMd5(info);
|
|
|
+ this.getBase64(info, imageUrl => {
|
|
|
+ this.imageUrl = imageUrl;
|
|
|
+ });
|
|
|
}, () => {
|
|
|
this.$message.error('图片尺寸必须是108*108!');
|
|
|
+ this.imageUrl = '';
|
|
|
+ this.urlResult = '';
|
|
|
+ this.md5Result = '';
|
|
|
return Promise.reject();
|
|
|
});
|
|
|
},
|
|
|
- handleChange(info) {
|
|
|
- this.getBase64(info.file.originFileObj, imageUrl => {
|
|
|
- this.imageUrl = imageUrl;
|
|
|
- });
|
|
|
- },
|
|
|
cosUpload(file) {
|
|
|
let that = this;
|
|
|
let date = new Date();
|
|
@@ -1938,6 +2014,10 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+ if (this.selectPackageTabs === '2' && !this.configForm.adAudiencePackageId) {
|
|
|
+ this.$message.error('请选择已有定向包');
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (this.configForm.adScheduleType === 'SCHEDULE_START_END' && !this.configForm.launchDateRange.length) {
|
|
|
this.$message.error('请选择投放时间');
|
|
|
return;
|
|
@@ -2007,6 +2087,7 @@ export default {
|
|
|
paramsFormData.adCity = paramsFormData.adSelectCity.join(',');
|
|
|
paramsFormData.adAge = paramsFormData.adSelectAge.join(',');
|
|
|
paramsFormData.adAc = paramsFormData.adSelectAc.join(',');
|
|
|
+ paramsFormData.adDeviceType = paramsFormData.adDeviceSelectType.join(',');
|
|
|
paramsFormData.productSellingPoints = this.configForm.defaultFormList && this.configForm.defaultFormList.map(item => item.value);
|
|
|
paramsFormData.creativeThirdIndustryId = paramsFormData.creativeThirdIndustryIds[2];
|
|
|
paramsFormData.creativeProductImageCode = this.md5Result;
|
|
@@ -2059,10 +2140,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.configForm.creativeLabel = [];
|
|
|
- if (this.creativeTag.length > 20) {
|
|
|
- this.creativeTag = this.creativeTag.slice(0, 20);
|
|
|
- this.$message.error('最多创建20个');
|
|
|
- }
|
|
|
},
|
|
|
handleTagsClose(removedTag) {
|
|
|
const tags = this.creativeTag.filter(tag => tag !== removedTag);
|