Преглед на файлове

添加列表重量数据

lvhao преди 4 месеца
родител
ревизия
41f23ac3d6
променени са 2 файла, в които са добавени 10 реда и са изтрити 4 реда
  1. 1 1
      core/CoreApp/models/Model_logic_weight.php
  2. 9 3
      core/CoreApp/models/Model_logic_whlabel.php

+ 1 - 1
core/CoreApp/models/Model_logic_weight.php

@@ -56,7 +56,7 @@ class Model_logic_weight extends Lin_Model {
         }
 
         $sku_str = implode("-",$sku);
-
+        var_dump($sku_str);
         $weight_info = $this->weight->get_features($sku_str);
         if(empty($weight_info)){
             return 0;

+ 9 - 3
core/CoreApp/models/Model_logic_whlabel.php

@@ -25,6 +25,7 @@ class Model_logic_whlabel extends Lin_Model {
                 $this->pmData();
             }
         }
+        
         foreach($list as $k=>$v){
             if(in_array('pm',$condition)){
                 $list[$k]['pm'] = $this->getPm($v['features']);
@@ -80,9 +81,14 @@ class Model_logic_whlabel extends Lin_Model {
         if(in_array(130,$features)){
             $type = 130;
         }
-        
-    
+        $tmp_features = [];
+        $t = $this->pmList;
+        foreach($features as $v){
+            if(isset($t[$v])){
+                $tmp_features[] = $t[$v];
+            }
+        }
 
-        return $this->logic_weight->getWeightByFeature($type,$features);
+        return $this->logic_weight->getWeightByFeature($type,$tmp_features);
     }
 }