Sfoglia il codice sorgente

三明易批花特殊需求:配送日期要在两天之内

shizhongqi 4 mesi fa
parent
commit
5f274e6188
1 ha cambiato i file con 10 aggiunte e 1 eliminazioni
  1. 10 1
      app-hd/controllers/PurchaseController.php

+ 10 - 1
app-hd/controllers/PurchaseController.php

@@ -644,6 +644,11 @@ class PurchaseController extends BaseController
                                 util::fail('没满100元且15扎,请返回选运费');
                             }
                         }
+                        // 按当天计时,把 sendTimeWant 要限制在两天的时间范围之内
+                        $future = date("Y-m-d", strtotime('+2 day'));
+                        if (strtotime($respond->sendTimeWant) > strtotime($future)) {
+                            util::fail('配货日期要在两天之内');
+                        }
                     }
 
                     if ($ghsShopId == 77703) {
@@ -676,8 +681,12 @@ class PurchaseController extends BaseController
                                 util::fail('没满50元且满10扎,请运费必选商品');
                             }
                         }
+                        // 按当天计时,把 sendTimeWant 要限制在两天的时间范围之内
+                        $future = date("Y-m-d", strtotime('+2 day'));
+                        if (strtotime($respond->sendTimeWant) > strtotime($future)) {
+                            util::fail('配送日期要在两天之内');
+                        }
                     }
-
                 }
 
                 if (isset($ghsInfo['home'])) {