|
@@ -479,6 +479,33 @@ export default {
|
|
callback('请输入正确的格式');
|
|
callback('请输入正确的格式');
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
+ let handleCharacterLen100 = (rule, value, callback) => {
|
|
|
|
+ const length = this.handleExportRules(value);
|
|
|
|
+ if (1 <= length && length <= 100) {
|
|
|
|
+ callback();
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ callback('只能输入1-100个字符');
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ let handleCharacterLen20 = (rule, value, callback) => {
|
|
|
|
+ const length = this.handleExportRules(value);
|
|
|
|
+ if (4 <= length && length <= 20) {
|
|
|
|
+ callback();
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ callback('只能输入4-20个字符');
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ let handleCharacterLen7 = (rule, value, callback) => {
|
|
|
|
+ const length = this.handleExportRules(value);
|
|
|
|
+ if (1 <= length && length <= 7) {
|
|
|
|
+ callback();
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ callback('只能输入1-7个字符');
|
|
|
|
+ }
|
|
|
|
+ };
|
|
return {
|
|
return {
|
|
adBudgetNum: 0,
|
|
adBudgetNum: 0,
|
|
campaignStatus: false,
|
|
campaignStatus: false,
|
|
@@ -536,22 +563,22 @@ export default {
|
|
],
|
|
],
|
|
campaignName: [
|
|
campaignName: [
|
|
{required: true, message: '请输入广告组名称', trigger: 'blur'},
|
|
{required: true, message: '请输入广告组名称', trigger: 'blur'},
|
|
- {min: 1, max: 100, message: '长度位1-100字符', trigger: 'blur'}
|
|
|
|
|
|
+ {validator: handleCharacterLen100, trigger: 'blur'}
|
|
],
|
|
],
|
|
creativeSource: [
|
|
creativeSource: [
|
|
{required: true, message: '请输入', trigger: 'blur'},
|
|
{required: true, message: '请输入', trigger: 'blur'},
|
|
- {min: 4, max: 20, message: '长度位4-20字符', trigger: 'blur'}
|
|
|
|
|
|
+ {validator: handleCharacterLen20, trigger: 'blur'}
|
|
],
|
|
],
|
|
adCpaBid: [
|
|
adCpaBid: [
|
|
{required: true, message: '请输入', trigger: 'blur'}
|
|
{required: true, message: '请输入', trigger: 'blur'}
|
|
],
|
|
],
|
|
adName: [
|
|
adName: [
|
|
{required: true, message: '请输入广告计划名称'},
|
|
{required: true, message: '请输入广告计划名称'},
|
|
- {min: 1, max: 100, message: '长度位1-100字符'}
|
|
|
|
|
|
+ {validator: handleCharacterLen100, trigger: 'blur'}
|
|
],
|
|
],
|
|
creativeProductDescription: [
|
|
creativeProductDescription: [
|
|
{required: true, message: '请输入', trigger: 'blur'},
|
|
{required: true, message: '请输入', trigger: 'blur'},
|
|
- {min: 1, max: 7, message: '长度位1-7字符', trigger: 'blur'}
|
|
|
|
|
|
+ {validator: handleCharacterLen7, trigger: 'blur'}
|
|
],
|
|
],
|
|
adConvertType: [{required: true, message: '请选择', trigger: 'change'}],
|
|
adConvertType: [{required: true, message: '请选择', trigger: 'change'}],
|
|
adConvertId: [{required: true, message: '请选择', trigger: 'change'}],
|
|
adConvertId: [{required: true, message: '请选择', trigger: 'change'}],
|
|
@@ -695,6 +722,20 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
moment,
|
|
moment,
|
|
|
|
+ handleExportRules(value) {
|
|
|
|
+ let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
|
|
|
|
+ let length = 0;
|
|
|
|
+ let strArr = value.split('');
|
|
|
|
+ strArr.forEach(item => {
|
|
|
|
+ if (cnReg.test(item)) {
|
|
|
|
+ length += 2;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ length += 1;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ return length;
|
|
|
|
+ },
|
|
handleGetPackage() {
|
|
handleGetPackage() {
|
|
const params = {
|
|
const params = {
|
|
urlPath: this.configForm.adDownloadUrl,
|
|
urlPath: this.configForm.adDownloadUrl,
|
|
@@ -739,9 +780,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
handleAccountMode(e) {
|
|
handleAccountMode(e) {
|
|
- if (e.target.value === '1') {
|
|
|
|
- this.configForm.accountBudget = '';
|
|
|
|
- }
|
|
|
|
|
|
+ this.configForm.accountBudget = '';
|
|
},
|
|
},
|
|
handleAdDownLoadType(e) {
|
|
handleAdDownLoadType(e) {
|
|
this.optimizationOption = [];
|
|
this.optimizationOption = [];
|
|
@@ -783,12 +822,12 @@ export default {
|
|
getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/queryById', {id: routeQuery.id}).then(result => {
|
|
getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/queryById', {id: routeQuery.id}).then(result => {
|
|
if (result.code === 0) {
|
|
if (result.code === 0) {
|
|
const detailData = result.result;
|
|
const detailData = result.result;
|
|
- this.configForm.accountId = detailData.accountId || '';
|
|
|
|
- this.configForm.dpLinkStartIndex = detailData.dpLinkStartIndex || '';
|
|
|
|
- this.configForm.dpLinkEndIndex = detailData.dpLinkEndIndex || '';
|
|
|
|
- this.configForm.accountBudgetMode = detailData.accountBudgetMode || '';
|
|
|
|
- this.configForm.accountBudget = detailData.accountBudget || '';
|
|
|
|
- this.configForm.campaignLandingType = detailData.campaignLandingType || '';
|
|
|
|
|
|
+ this.configForm.accountId = detailData.accountId;
|
|
|
|
+ this.configForm.dpLinkStartIndex = detailData.dpLinkStartIndex;
|
|
|
|
+ this.configForm.dpLinkEndIndex = detailData.dpLinkEndIndex;
|
|
|
|
+ this.configForm.accountBudgetMode = detailData.accountBudgetMode;
|
|
|
|
+ this.configForm.accountBudget = detailData.accountBudget;
|
|
|
|
+ this.configForm.campaignLandingType = detailData.campaignLandingType;
|
|
this.configForm.advertisingType = detailData.advertisingType || '1';
|
|
this.configForm.advertisingType = detailData.advertisingType || '1';
|
|
this.configForm.campaignName = detailData.campaignName || '';
|
|
this.configForm.campaignName = detailData.campaignName || '';
|
|
this.configForm.adName = detailData.adName || '';
|
|
this.configForm.adName = detailData.adName || '';
|
|
@@ -860,7 +899,8 @@ export default {
|
|
}
|
|
}
|
|
if (detailData.creativeSceneInventory) {
|
|
if (detailData.creativeSceneInventory) {
|
|
this.configForm.adverPosition = 'c';
|
|
this.configForm.adverPosition = 'c';
|
|
- this.radioChangeValue = detailData.creativeSceneInventory;
|
|
|
|
|
|
+ this.configForm.radioChangeValue = detailData.creativeSceneInventory;
|
|
|
|
+ console.log(this.radioChangeValue, 'this.radioChangeValue--this.radioChangeValue');
|
|
}
|
|
}
|
|
else if (detailData.creativeInventoryType) {
|
|
else if (detailData.creativeInventoryType) {
|
|
this.configForm.adverPosition = 'b';
|
|
this.configForm.adverPosition = 'b';
|
|
@@ -1172,6 +1212,9 @@ export default {
|
|
if (paramsFormData.adAndroidVersion = 'a') {
|
|
if (paramsFormData.adAndroidVersion = 'a') {
|
|
paramsFormData.adAndroidOsv = paramsFormData.androidChangeValue;
|
|
paramsFormData.adAndroidOsv = paramsFormData.androidChangeValue;
|
|
}
|
|
}
|
|
|
|
+ else if (paramsFormData.adAndroidVersion = 'NONE') {
|
|
|
|
+ paramsFormData.adAndroidOsv = 'NONE';
|
|
|
|
+ }
|
|
paramsFormData.productSellingPoints = this.configForm.defaultFormList && this.configForm.defaultFormList.map(item => item.value);
|
|
paramsFormData.productSellingPoints = this.configForm.defaultFormList && this.configForm.defaultFormList.map(item => item.value);
|
|
paramsFormData.creativeThirdIndustryId = paramsFormData.creativeThirdIndustryIds[2];
|
|
paramsFormData.creativeThirdIndustryId = paramsFormData.creativeThirdIndustryIds[2];
|
|
paramsFormData.creativeProductImageCode = this.md5Result;
|
|
paramsFormData.creativeProductImageCode = this.md5Result;
|