shish 3 years ago
parent
commit
85f0fd7223
1 changed files with 3 additions and 2 deletions
  1. 3 2
      app-hd/controllers/PurchaseController.php

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

@@ -131,11 +131,12 @@ class PurchaseController extends BaseController
                         if (strtotime($sendTimeWant) < $nowTime) {
                             util::fail('不能选择过去时间');
                         }
-                        $hasDate = $currentInfo['presellDateList'] ?? [];
+                        $hasDateStr = $currentInfo['presellDate'] ?? [];
+                        $hasDate = explode(',', trim($hasDateStr));
                         if (empty($hasDate)) {
                             util::fail('预售日期有问题,请提醒门店');
                         }
-                        if (in_array($sendTimeWant, $hasDate) == false) {
+                        if (in_array(strtotime($sendTimeWant), $hasDate) == false) {
                             util::fail('您填的送花时间不在预售范围,花材:' . $currentName);
                         }
                     }