wjx 2 years ago
parent
commit
de91da3ac6

+ 5 - 3
src/pages/launchSystemNew/launchManage/createAd/targeting/modal/index.tsx

@@ -145,7 +145,9 @@ function TargetingPup(props: Props) {
                         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;
@@ -183,7 +185,7 @@ function TargetingPup(props: Props) {
                 }
             })
             // console.log(JSON.stringify(newValues))
-            newValues['isTemplate']=template_checked
+            newValues['isTemplate'] = template_checked
             // 开启存为模板开关执行
             // if (template_checked && type === 'add') {
             //     create.run(newValues).then(res => {
@@ -192,7 +194,7 @@ function TargetingPup(props: Props) {
             //         }
             //     })
             // } else {
-                callback(newValues)
+            callback(newValues)
             // }
         })
     }, [form, regionsList, template_checked, type])