|
@@ -140,12 +140,16 @@ function TargetingPup(props: Props) {
|
|
|
delete newValues.excludedActions
|
|
|
break;
|
|
|
case 'networkType'://联网方式
|
|
|
- newValues[key] === '1' && (newValues.targeting.networkType = newValues.network)
|
|
|
+ if (newValues.network) {
|
|
|
+ newValues[key] === '1' && (newValues.targeting.networkType = newValues.network)
|
|
|
+ }
|
|
|
delete newValues[key]
|
|
|
delete newValues.network
|
|
|
break;
|
|
|
case 'devicePriceType'://手机价格
|
|
|
- newValues[key] === '1' && (newValues.targeting.devicePrice = newValues.devicePrice)
|
|
|
+ if (newValues.devicePrice) {
|
|
|
+ newValues[key] === '1' && (newValues.targeting.devicePrice = newValues.devicePrice)
|
|
|
+ }
|
|
|
delete newValues[key]
|
|
|
delete newValues.devicePrice
|
|
|
break;
|
|
@@ -169,7 +173,7 @@ function TargetingPup(props: Props) {
|
|
|
delete newValues.userOsAndroid
|
|
|
break;
|
|
|
case 'excludedDimension'://排除已转化用户
|
|
|
- if (newValues[key] !== '0') {
|
|
|
+ if (newValues[key] !== '0' && newValues.conversionBehaviorList) {
|
|
|
newValues.targeting.excludedConvertedAudience = newValues.conversionBehaviorList ? {
|
|
|
excludedDimension: newValues.excludedDimension,
|
|
|
conversionBehaviorList: [newValues.conversionBehaviorList]
|
|
@@ -182,8 +186,8 @@ function TargetingPup(props: Props) {
|
|
|
break;
|
|
|
}
|
|
|
})
|
|
|
- // console.log(JSON.stringify(newValues))
|
|
|
- newValues['isTemplate']=template_checked
|
|
|
+ console.log(JSON.stringify(newValues))
|
|
|
+ newValues['isTemplate'] = template_checked
|
|
|
// 开启存为模板开关执行
|
|
|
// if (template_checked && type === 'add') {
|
|
|
// create.run(newValues).then(res => {
|
|
@@ -192,7 +196,7 @@ function TargetingPup(props: Props) {
|
|
|
// }
|
|
|
// })
|
|
|
// } else {
|
|
|
- callback(newValues)
|
|
|
+ callback(newValues)
|
|
|
// }
|
|
|
})
|
|
|
}, [form, regionsList, template_checked, type])
|
|
@@ -297,7 +301,7 @@ function TargetingPup(props: Props) {
|
|
|
maritalStatusType: maritalStatus ? '1' : '0',//婚恋
|
|
|
maritalStatus,//婚恋
|
|
|
excludedDimension: excludedConvertedAudience ? excludedConvertedAudience?.excludedDimension : '0',//排除已转化
|
|
|
- conversionBehaviorList: excludedConvertedAudience ? excludedConvertedAudience?.conversionBehaviorList[0] : undefined,//排除已转化
|
|
|
+ conversionBehaviorList: excludedConvertedAudience && excludedConvertedAudience?.conversionBehaviorList ? excludedConvertedAudience?.conversionBehaviorList[0] : undefined,//排除已转化
|
|
|
deviceBrandModelType: deviceBrandModel ? '1' : '0',//设备品牌型号
|
|
|
deviceBrandModelList: deviceBrandModel?.excludedList || deviceBrandModel?.includedList,//设备品牌型号
|
|
|
isexcluded: deviceBrandModel && deviceBrandModel?.excludedList,//设备品牌型号
|