From 00289cbd3a44db4f8076c76749e34065bf7be210 Mon Sep 17 00:00:00 2001 From: Lemon <15040771@qq.com> Date: Sat, 12 Sep 2020 21:20:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=81=E8=BE=BE=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/AppointmentTimeService.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Service/v3/Implementations/AppointmentTimeService.php b/app/Service/v3/Implementations/AppointmentTimeService.php index c115d47..31c0311 100644 --- a/app/Service/v3/Implementations/AppointmentTimeService.php +++ b/app/Service/v3/Implementations/AppointmentTimeService.php @@ -42,8 +42,12 @@ class AppointmentTimeService implements AppointmentTimeServiceInterface $time4 = array_values(array_column($stores,'time4')); $startTimeArr = array_merge($time1,$time3); $endTimeArr = array_merge($time2,$time4); - array_filter($startTimeArr); - array_filter($endTimeArr); + $startTimeArr = array_values(array_filter($startTimeArr,function ($value){ + return boolval($value); + })); + $endTimeArr = array_values(array_filter($endTimeArr,function ($value){ + return boolval($value); + })); $startTime = max($startTimeArr); $endTime = min($endTimeArr); // foreach ($stores as $store){