|
@@ -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名称未选择')
|
|
|
}
|
|
|
}
|