wjx 2 年之前
父節點
當前提交
de91da3ac6
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      src/pages/launchSystemNew/launchManage/createAd/targeting/modal/index.tsx

+ 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])