Преглед изворни кода

杭州斗南不支持免费送货

shish пре 3 година
родитељ
комит
50568bdbbf
2 измењених фајлова са 14 додато и 1 уклоњено
  1. 13 0
      app-hd/controllers/PurchaseController.php
  2. 1 1
      common/components/dict.php

+ 13 - 0
app-hd/controllers/PurchaseController.php

@@ -240,6 +240,19 @@ class PurchaseController extends BaseController
             $post['product'] = $productList;
 
             $sendType = $post['sendType'] ?? 0;
+            if ($sendType == 0) {
+                //杭州斗南不支持免费送货
+                if (getenv('YII_ENV') == 'production') {
+                    if ($ghsShopId == 4608) {
+                        util::fail('请选择到店自取或发跑腿');
+                    }
+                } else {
+                    if ($ghsShopId == 36523) {
+                        util::fail('请选择到店自取或发跑腿');
+                    }
+                }
+            }
+
             $sendCost = 0;
 
             if ($sendType == dict::getDict('sendType', 'thirdSend')) {

+ 1 - 1
common/components/dict.php

@@ -51,7 +51,7 @@ class dict
             'big' => 0,
             'small' => 1,
         ],
-        //配送方式,0出车取货 1到店自取 2请跑腿送 3发物流
+        //配送方式,0免费送货 1到店自取 2请跑腿送 3发物流
         'sendType' => [
             'carGet' => 0,
             'shopGet' => 1,