|
|
@@ -145,11 +145,15 @@ class OrderController extends BaseController
|
|
|
$post['discountType'] = $discountData['discountType'];
|
|
|
$post['discountAmount'] = $discountData['discountAmount'];
|
|
|
|
|
|
- $post['reachDate'] = isset($post['reachDate']) && !empty($post['reachDate']) ? $post['reachDate'] : date("Y-m-d");
|
|
|
- if (isset($post['reachPeriod']) == false || empty($post['reachPeriod'])) {
|
|
|
- util::fail('请选择配送时间');
|
|
|
+ //自取订单不用考虑配送时间
|
|
|
+ $sendType = $post['sendType'] ?? 0;
|
|
|
+ if ($sendType != 1) {
|
|
|
+ $post['reachDate'] = isset($post['reachDate']) && !empty($post['reachDate']) ? $post['reachDate'] : date("Y-m-d");
|
|
|
+ if (isset($post['reachPeriod']) == false || empty($post['reachPeriod'])) {
|
|
|
+ util::fail('请选择配送时间');
|
|
|
+ }
|
|
|
+ $post['reachTime'] = strtotime($post['reachDate'] . ' ' . $post['reachPeriod']);
|
|
|
}
|
|
|
- $post['reachTime'] = strtotime($post['reachDate'] . ' ' . $post['reachPeriod']);
|
|
|
|
|
|
$now = time();
|
|
|
$expireTime = $now + 1800;//订单30分钟后过期
|