Browse Source

修改logic_crm的没有产品名字信息的bug

lvhao 7 months ago
parent
commit
b1d869e97b
1 changed files with 6 additions and 5 deletions
  1. 6 5
      core/CoreApp/models/Model_logic_crm.php

+ 6 - 5
core/CoreApp/models/Model_logic_crm.php

@@ -54,12 +54,13 @@ class Model_logic_crm extends Lin_Model {
         foreach($sku_list as $key => $value){
             if(empty($product_list[$key])){
                 $flag= true;
+            }else{
+                $item_list[] = [
+                    "name"=>$product_list[$key],
+                    "sku"=>$value,
+                    "qty"=>isset($qty_list[$key])?$qty_list[$key]:1,
+                ];
             }
-            $item_list[] = [
-                "name"=>$product_list[$key],
-                "sku"=>$value,
-                "qty"=>isset($qty_list[$key])?$qty_list[$key]:1,
-            ];
         }
 
        if($flag){