|
|
@@ -116,10 +116,6 @@ class PurchaseController extends BaseController
|
|
|
if (!empty($productInfoList)) {
|
|
|
$presellData = [];
|
|
|
$nowTime = strtotime(date("Y-m-d"));
|
|
|
- $sendTimeWant = $post['sendTimeWant'];
|
|
|
- if (strtotime($sendTimeWant) < $nowTime) {
|
|
|
- util::fail('送花时间不能选择过去时间');
|
|
|
- }
|
|
|
foreach ($productInfoList as $currentInfo) {
|
|
|
if (isset($currentInfo['mainId']) == false || $currentInfo['mainId'] != $ghsMainId) {
|
|
|
util::fail('只能选择同一家的商品哦');
|
|
|
@@ -131,6 +127,10 @@ class PurchaseController extends BaseController
|
|
|
if (isset($post['sendTimeWant']) == false || empty($post['sendTimeWant'])) {
|
|
|
util::fail('有预售花材,请选择送花日期');
|
|
|
}
|
|
|
+ $sendTimeWant = $post['sendTimeWant'];
|
|
|
+ if (strtotime($sendTimeWant) < $nowTime) {
|
|
|
+ util::fail('送花时间不能选择过去时间');
|
|
|
+ }
|
|
|
$hasDateStr = $currentInfo['presellDateList'] ?? '';
|
|
|
$hasDate = json_decode($hasDateStr, true);
|
|
|
if (empty($hasDate)) {
|