소스 검색

自动投放 1.4

jiayufei 4 년 전
부모
커밋
cec78b0b9b
2개의 변경된 파일73개의 추가작업 그리고 47개의 파일을 삭제
  1. 71 45
      src/views/modules/account-config/components/configuration-modal.vue
  2. 2 2
      vue.config.js

+ 71 - 45
src/views/modules/account-config/components/configuration-modal.vue

@@ -327,7 +327,6 @@
                             <a-radio-group
                                 v-model="configForm.adDistrict"
                                 button-style="solid"
-                                @change="handleAdDistrictChange"
                             >
                                 <a-radio-button value="NONE">不限</a-radio-button>
                                 <a-radio-button value="CITY">按省市</a-radio-button>
@@ -352,7 +351,7 @@
                             </a-radio-group>
                         </div>
                         <a-form-model-item label="性别">
-                            <a-radio-group v-model="configForm.adGender" button-style="solid" @change="handleAdGenderChange">
+                            <a-radio-group v-model="configForm.adGender" button-style="solid">
                                 <a-radio-button value="NONE">不限</a-radio-button>
                                 <a-radio-button value="GENDER_MALE">男</a-radio-button>
                                 <a-radio-button value="GENDER_FEMALE">女</a-radio-button>
@@ -365,7 +364,6 @@
                             <a-radio-group
                                 v-model="configForm.adInterestActionMode"
                                 button-style="solid"
-                                @change="handleAdInterestActionModeChange"
                             >
                                 <a-radio-button value="UNLIMITED">不限</a-radio-button>
                                 <a-radio-button value="RECOMMEND">
@@ -1545,9 +1543,77 @@ export default {
         },
         NewAdSelectAge() {
             return this.configForm.adSelectAge;
+        },
+        NewAdDistrict() {
+            return this.configForm.adDistrict;
+        },
+        NewAdGender() {
+            return this.configForm.adGender;
+        },
+        NewAdInterestActionMode() {
+            return this.configForm.adInterestActionMode;
+        },
+        NewCustomPerson() {
+            return this.configForm.customPerson;
+        },
+        NewAdAutoExtendList() {
+            return this.adAutoExtendList;
         }
     },
     watch: {
+        NewAdAutoExtendList(newVal) {
+            if (newVal.length) {
+                this.configForm.adAutoExtendEnabled = '1';
+            }
+            else {
+                this.configForm.adAutoExtendEnabled = '0';
+            }
+        },
+        NewCustomPerson(newVal) {
+            if (newVal !== 'NONE') {
+                this.adAutoExtendList.push({
+                    value: 'CUSTOM_AUDIENCE',
+                    label: '自定人群-定向'
+                });
+            }
+            else {
+                this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'CUSTOM_AUDIENCE');
+            }
+            
+        },
+        NewAdInterestActionMode(newVal) {
+            if (newVal !== 'UNLIMITED') {
+                this.adAutoExtendList.push({
+                    value: 'INTEREST_ACTION',
+                    label: '行为兴趣'
+                });
+            }
+            else {
+                this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'INTEREST_ACTION');
+            }
+        },
+        NewAdGender(newVal) {
+            if (newVal !== 'NONE') {
+                this.adAutoExtendList.push({
+                    value: 'GENDER',
+                    label: '性别'
+                });
+            }
+            else {
+                this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'GENDER');
+            }
+        },
+        NewAdDistrict(newVal) {
+            if (newVal !== 'NONE') {
+                this.adAutoExtendList.push({
+                    value: 'REGION',
+                    label: '地域'
+                });
+            }
+            else {
+                this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'REGION');
+            }
+        },
         NewAdSelectAge(newVal) {
             if (newVal[0] !== 'NONE') {
                 if (!this.adAutoExtendList.find(item => item.value === 'AGE')) {
@@ -1663,39 +1729,6 @@ export default {
     methods: {
         ...mapGetters(['nickname', 'avatar', 'userInfo']),
         moment,
-        handleAdDistrictChange(e) {
-            if (e.target.value !== 'NONE') {
-                this.adAutoExtendList.push({
-                    value: 'REGION',
-                    label: '地域'
-                });
-            }
-            else {
-                this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'REGION');
-            }
-        },
-        handleAdGenderChange(e) {
-            if (e.target.value !== 'NONE') {
-                this.adAutoExtendList.push({
-                    value: 'GENDER',
-                    label: '性别'
-                });
-            }
-            else {
-                this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'GENDER');
-            }
-        },
-        handleAdInterestActionModeChange(e) {
-            if (e.target.value !== 'UNLIMITED') {
-                this.adAutoExtendList.push({
-                    value: 'INTEREST_ACTION',
-                    label: '行为兴趣'
-                });
-            }
-            else {
-                this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'INTEREST_ACTION');
-            }
-        },
         NewCheckboxChangeValue(newVal) {
             if (newVal.length) {
                 if (newVal.includes('INVENTORY_AWEME_FEED')) {
@@ -1798,11 +1831,11 @@ export default {
         },
         handleSelectPackageTabs(e) {
             if (this.modalTitle === 'add') {
-                if (e === '1') {
+                if (e === 'add') {
                     this.configForm.adAudiencePackageId = undefined;
                     this.packageMessageDetail = [];
                 }
-                else if (e === '2') {
+                else if (e === 'choice') {
                     this.configForm.adDistrict = 'NONE';
                     this.listArr = [];
                     this.configForm.adLocationType = 'HOME';
@@ -1832,14 +1865,9 @@ export default {
                 this.configForm.adRetargetingTagsExclude = '';
                 this.configForm.updateGetingExclude = [];
                 this.configForm.adRetargetingTagsType = '';
-                this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'CUSTOM_AUDIENCE');
             }
             else if (defaultValue === 'a') {
                 this.configForm.adRetargetingTagsType = '1';
-                this.adAutoExtendList.push({
-                    value: 'CUSTOM_AUDIENCE',
-                    label: '自定人群-定向'
-                });
             }
         },
         handleAsyncPackage() {
@@ -2759,8 +2787,6 @@ export default {
                 this.$message.error('请选择投放时段');
                 return;
             }
-            // this.isTomatoStatus = true;
-            // this.isTAwemeStatus = true;
             if (this.isTAwemeStatus && !this.urlResult) {
                 this.$message.error('请上传图片');
                 return;

+ 2 - 2
vue.config.js

@@ -86,8 +86,8 @@ module.exports = {
         //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目 
         // target:'http://118.24.244.213:8804',
-        target: 'http://192.168.1.43:8806', // 子安
-        // target: 'http://192.168.1.8:8806', // 学超
+        // target: 'http://192.168.1.43:8806', // 子安
+        target: 'http://192.168.1.8:8806', // 学超
       //  target:'http://139.186.165.84:8806', //测试
         // target:'http://apipre.tjyourong.com.cn', //预生产