shish před 1 rokem
rodič
revize
69714d4c98
1 změnil soubory, kde provedl 12 přidání a 3 odebrání
  1. 12 3
      app-hd/controllers/PurchaseController.php

+ 12 - 3
app-hd/controllers/PurchaseController.php

@@ -597,13 +597,22 @@ class PurchaseController extends BaseController
                     if($ghsInfo['home'] == 0){
                         util::fail('暂不支持送货上门,请选其它配送方式');
                     }
-                    if(isset($ghsInfo['homeAmount']) && $ghsInfo['homeAmount']>$respond->actPrice){
+                    if(!empty($ghsInfo['homeAmount'])){
+                        $homeType = $ghsInfo['homeType']??0;
                         $homeAmount = floatval($ghsInfo['homeAmount']);
-                        util::fail("满{$homeAmount}元 可送货上门");
+                        if($homeType == 0){
+                            if($homeAmount>$respond->actPrice){
+                                util::fail("满{$homeAmount}元 可送货上门");
+                            }
+                        }
+                        if($homeType == 1){
+                            if ($homeAmount>$respond->bigNum) {
+                                util::fail("满{$homeAmount}扎 可送货上门");
+                            }
+                        }
                     }
                 }
 
-
             }
             if ($sendType == 2) {
                 if (in_array($ghsShopId, [520, 1489, 13628, 3, 7855, 7687])) {