diff --git a/app/Controller/v3/OrderOnlineController.php b/app/Controller/v3/OrderOnlineController.php index 6e9669b..8e8b3f0 100644 --- a/app/Controller/v3/OrderOnlineController.php +++ b/app/Controller/v3/OrderOnlineController.php @@ -96,7 +96,7 @@ class OrderOnlineController extends BaseController 'distribution_price' => 0 ]; //返回预约送达时间 数组 - $res['appointment_time'] = $this->appointmentTimeService->get($shopcartIds); + $res['appointment_time'] = $this->appointmentTimeService->do($shopcartIds); $res['store_list'] = $this->shopCartService->getGoodsByShopcartId($shopcartIds); //获取用户优惠券 diff --git a/app/Service/v3/Implementations/AppointmentTimeService.php b/app/Service/v3/Implementations/AppointmentTimeService.php index 8b80d21..f3d6c58 100644 --- a/app/Service/v3/Implementations/AppointmentTimeService.php +++ b/app/Service/v3/Implementations/AppointmentTimeService.php @@ -77,6 +77,7 @@ class AppointmentTimeService implements AppointmentTimeServiceInterface if($nowTime > $time1Max){ $time1Max = $nowTime; } + $res = []; for($i = 1;$i<=10;$i++){ $time = time() + (30*60*$i); if($time < $time2Min){