Parcourir la source

自动投放 1.4

jiayufei il y a 4 ans
Parent
commit
963d8ac75d

+ 2 - 2
src/views/modules/account-config/account-config-server.js

@@ -5,6 +5,6 @@
 
 // export const urlAcount = 'http://118.24.244.213:8080'; // 线上
 // export const urlAcount = 'http://apipre.tjyourong.com.cn'; // 预生产
-// export const urlAcount = 'http://192.168.1.43:8080'; // 子安
+export const urlAcount = 'http://192.168.1.43:8080'; // 子安
 // export const urlAcount = 'http://139.186.165.84:8080'; // 测试
-export const urlAcount = 'http://192.168.1.8:8080'; // 学超
+// export const urlAcount = 'http://192.168.1.8:8080'; // 学超

+ 68 - 25
src/views/modules/account-config/components/configuration-modal.vue

@@ -324,7 +324,11 @@
                     <a-tab-pane key="add" tab="新建定向">
                         <p class="rock-title">用户定向</p>
                         <a-form-model-item label="地域">
-                            <a-radio-group v-model="configForm.adDistrict" button-style="solid">
+                            <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>
                                 <a-radio-button value="COUNTY" disabled>按区县</a-radio-button>
@@ -348,7 +352,7 @@
                             </a-radio-group>
                         </div>
                         <a-form-model-item label="性别">
-                            <a-radio-group v-model="configForm.adGender" button-style="solid">
+                            <a-radio-group v-model="configForm.adGender" button-style="solid" @change="handleAdGenderChange">
                                 <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>
@@ -361,6 +365,7 @@
                             <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">
@@ -521,7 +526,12 @@
                             </a-tooltip>
                         </a-form-model-item>
                         <a-form-model-item label="智能放量">
-                            <a-radio-group v-model="configForm.adAutoExtendEnabled" button-style="solid" @change="handleAdAutoExtend">
+                            <a-radio-group
+                                :disabled="!adAutoExtendList.length"
+                                v-model="configForm.adAutoExtendEnabled"
+                                button-style="solid"
+                                @change="handleAdAutoExtend"
+                            >
                                 <a-radio-button value="0">不开启</a-radio-button>
                                 <a-radio-button value="1">开启</a-radio-button>
                             </a-radio-group>
@@ -1161,28 +1171,7 @@ export default {
                     label: 'PC'
                 }
             ],
-            adAutoExtendList: [
-                {
-                    value: 'AGE',
-                    label: '年龄'
-                },
-                {
-                    value: 'REGION',
-                    label: '地域'
-                },
-                {
-                    value: 'GENDER',
-                    label: '性别'
-                },
-                {
-                    value: 'INTEREST_ACTION',
-                    label: '行为兴趣'
-                },
-                {
-                    value: 'CUSTOM_AUDIENCE',
-                    label: '自定人群-定向'
-                }
-            ],
+            adAutoExtendList: [],
             directionalData: [],
             platformLoadingType: '',
             deviceTypeList: [
@@ -1553,9 +1542,25 @@ export default {
         },
         NewIsTAwemeStatus() {
             return this.isTAwemeStatus;
+        },
+        NewAdSelectAge() {
+            return this.configForm.adSelectAge;
         }
     },
     watch: {
+        NewAdSelectAge(newVal) {
+            if (newVal[0] !== 'NONE') {
+                if (!this.adAutoExtendList.find(item => item.value === 'AGE')) {
+                    this.adAutoExtendList.push({
+                        value: 'AGE',
+                        label: '年龄'
+                    });
+                }
+            }
+            else {
+                this.adAutoExtendList = this.adAutoExtendList.filter(item => item.value !== 'AGE');
+            }
+        },
         NewIsTAwemeStatus(newVal) {
             if (!newVal) {
                 this.md5Result = '';
@@ -1658,6 +1663,39 @@ 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')) {
@@ -1794,9 +1832,14 @@ 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() {

+ 12 - 0
src/views/modules/account-config/components/tree-select/tree-select.vue

@@ -67,6 +67,18 @@ export default {
             changeCheckData: []
         };
     },
+    watch: {
+        defaultlist(newVal) {
+            if (newVal.length) {
+                this.changeCheckData = this.defaultlist;
+                this.updateTreeData = this.defaultlist;
+            }
+            else {
+                this.changeCheckData = [];
+                this.updateTreeData = [];
+            }
+        }
+    },
     mounted() {
         this.changeCheckData = this.defaultlist;
         this.updateTreeData = this.defaultlist;

+ 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', //预生产