From 1879a8cda068388c9d9c8d2c0a0110998b85dc4e Mon Sep 17 00:00:00 2001 From: Lemon <15040771@qq.com> Date: Mon, 14 Sep 2020 15:11:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=80=BC=E6=9C=8D=E5=8A=A1=E6=96=87?= =?UTF-8?q?=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/v3/OrderOnlineController.php | 2 +- app/Service/v3/Implementations/StoreService.php | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/Controller/v3/OrderOnlineController.php b/app/Controller/v3/OrderOnlineController.php index 0f2e1fe..80f38db 100644 --- a/app/Controller/v3/OrderOnlineController.php +++ b/app/Controller/v3/OrderOnlineController.php @@ -103,7 +103,7 @@ class OrderOnlineController extends BaseController $res['coupon'] = $this->couponRecService->allForOnlineOrderAvailable($userId, $marketId); //增值服务接口 $res['value_added_service'] = [ - 'text' => '买鸡买鸭,免费帮杀;买瓜买黇,包熟包甜', + 'text' => '勾选本条款视为您同意接受懒族生活为您提供增值服务的费用,包括但不仅限于洗菜,切菜,装菜所产生的打包费用,送货上门等增值服务', 'select' => 1, 'price' => 3.50, 'original_price' => 0.00 diff --git a/app/Service/v3/Implementations/StoreService.php b/app/Service/v3/Implementations/StoreService.php index 3cf5a14..ba84527 100644 --- a/app/Service/v3/Implementations/StoreService.php +++ b/app/Service/v3/Implementations/StoreService.php @@ -25,14 +25,15 @@ class StoreService implements StoreServiceInterface ->first(); if(!empty($store)){ $nowTime = time(); - $time1 = strtotime(($store->time1)); - $time2 = strtotime(($store->time2)); - if($time1 < $nowTime && $nowTime < $time2){ - return true; + $startTime = strtotime(($store->time1)); + if(!empty($store->time3) && !empty($store->time4)){ + $time4 = strtotime(($store->time4)); + $endTime = $time4; + }else{ + $time2 = strtotime(($store->time2)); + $endTime = $time2; } - $time3 = strtotime(($store->time3)); - $time4 = strtotime(($store->time4)); - if($time3 < $nowTime && $nowTime < $time4){ + if($nowTime > $startTime && $nowTime < $endTime){ return true; } }