linwu 9 сар өмнө
parent
commit
8f8964295d

+ 3 - 2
app/api/controller/Appointment.php

@@ -138,8 +138,9 @@ class Appointment extends Base
         $now     = time();
         $now     = time();
         foreach ($timePeriods as $ticket => $period) {
         foreach ($timePeriods as $ticket => $period) {
             //排除过期时段
             //排除过期时段
-            $timerang   = explode(' - ', $period);
-            $period_end = $timerang[1];
+            $timerang   = explode('-', $period);
+
+            $period_end = trim($timerang[1]);
             if ($now > strtotime($daytime . ' ' . $period_end)) {
             if ($now > strtotime($daytime . ' ' . $period_end)) {
                 continue;
                 continue;
             }
             }