Pārlūkot izejas kodu

修改定向包

朱鑫波 4 gadi atpakaļ
vecāks
revīzija
538e878ba0

+ 43 - 0
src/views/modules/autoLaunch/directional/components/targetedPopulation.vue

@@ -1112,15 +1112,56 @@ export default {
           if (values.age) {
             values.min = values.age[0]
             values.max = values.age[1]
+            
+          }else {
+            values.min = -1
+            values.max = -1
+          }
+          if (values.agesRange) {
+          }else {
+           values.agesRange = []
+          }
+          if(values.fansStar) {
+
+          }else{
+            values.fansStar = []
+          }
+          if(values.interestVideo) {
+
+          }else{
+            values.interestVideo = []
+          }
+          if(values.devicePrice) {
+
+          }else{
+            values.devicePrice = []
+          }
+          if(values.deviceBrand) {
+
+          }else{
+            values.deviceBrand = []
+          }
+          if(this.allForm.businessInterestType == 2){
+
+          }else{
+            values.businessInterest = []
           }
           var json = {}
           if (this.allForm.appType == '2') {
             json.appIds = this.optionsAll
+            values.appInterest = []
+          }else if(this.allForm.appType == '1') {
+            json.appIds = []
+          }else{
+            values.appInterest = []
+            json.appIds = []
           }
           if (this.allForm.regionType == 'limit') {
             json.region = this.allForm.region.map((item) => {
               return item.value
             })
+          }else{
+            json.region = []
           }
           var jsonData = {}
           if (this.people == '3') {
@@ -1128,7 +1169,9 @@ export default {
               jsonData.population = this.selectedRowKeysValue.map((item) => {
                 return item.orientationId
               })
+              jsonData.excludePopulation = []
             } else if (this.targeted == '3') {
+              jsonData.population = []
               jsonData.excludePopulation = this.selectedRowKeysValueNo.map((item) => {
                 return item.orientationId
               })

+ 16 - 9
src/views/modules/autoLaunch/directional/components/templateModal.vue

@@ -194,14 +194,21 @@ export default {
           // })
 
           this.populationData.allForm.ageType =
-            dataJson.agesRange.length > 0 ? 'ageLimit' : dataJson.min ? 'ageCustom' : 'noLimit'
-          this.populationData.allForm.device = dataJson.deviceBrand ? '1' : '0'
-          this.populationData.allForm.price = dataJson.devicePrice ? '1' : '0'
-          this.populationData.allForm.appType = dataJson.appInterest ? '1' : dataJson.appIds ? '2' : '0'
-          this.populationData.allForm.fansStar = dataJson.fansStar ? '1' : '0'
-          this.populationData.allForm.interestVideo = dataJson.interestVideo ? '1' : '0'
+            dataJson.agesRange.length > 0 ? 'ageLimit' : dataJson.min>0 ? 'ageCustom' : 'noLimit'
+          this.populationData.allForm.device = dataJson.deviceBrand && eval(dataJson.deviceBrand).length > 0 ? '1' : '0'
+          this.populationData.allForm.price = dataJson.devicePrice && eval(dataJson.devicePrice).length > 0 ? '1' : '0'
+          this.populationData.allForm.appType =
+            dataJson.appInterest && eval(dataJson.appInterest).length > 0
+              ? '1'
+              : dataJson.appIds && eval(dataJson.appIds).length > 0
+              ? '2'
+              : '0'
+          this.populationData.allForm.fansStar =
+            dataJson.fansStar && eval(dataJson.fansStar).length > 0 ? '1' : '0'
+          this.populationData.allForm.interestVideo =
+            dataJson.interestVideo && eval(dataJson.interestVideo).length > 0 ? '1' : '0'
           this.populationData.allForm.platform_os = dataJson.platformOs
-          this.populationData.allForm.businessInterestType = dataJson.businessInterest ? 2 : 0
+          this.populationData.allForm.businessInterestType = dataJson.businessInterestType
           this.populationData.allForm.isOpen = dataJson.isOpen
           this.populationData.allForm.noAgeBreak = dataJson.noAgeBreak + ''
           this.populationData.allForm.noGenderBreak = dataJson.noGenderBreak + ''
@@ -230,8 +237,8 @@ export default {
       e.preventDefault()
       this.$refs.population.handleSubmit()
       this.$refs.population.formAll.validateFields((err, value) => {
-        if(this.populationData.allForm.appType == '2') {
-          if(this.populationData.appIds.length==0){
+        if (this.populationData.allForm.appType == '2') {
+          if (this.populationData.appIds.length == 0) {
             this.$message.error('APP名称未选择')
           }
         }

+ 2 - 2
vue.config.js

@@ -77,7 +77,7 @@ module.exports = {
         // target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.43:8806', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        // target: 'http://192.168.1.219:8081', //请求本地 需要jeecg-boot后台项目  赵西安
+        target: 'http://192.168.1.219:8081', //请求本地 需要jeecg-boot后台项目  赵西安
         // target: 'http://192.168.1.193:8080', //请求本地 需要jeecg-boot后台项目  李煜一
         // target: 'http://192.168.1.193:31012', //请求本地 需要jeecg-boot后台项目  李煜一
         //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
@@ -86,7 +86,7 @@ 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://139.186.165.84:8806', //测试
+      //  target:'http://139.186.165.84:8806', //测试
 
         ws: false,