Silent %!s(int64=6) %!d(string=hai) anos
pai
achega
13a113d675
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      app/Http/Controllers/WeChat/ApiController.php

+ 4 - 1
app/Http/Controllers/WeChat/ApiController.php

xqd
@@ -196,7 +196,10 @@ class ApiController extends Controller
             if($item->begin_date_time >= $begin_date_time) {
                 $thisMonthLearnTime += $duration;
                 $day = Carbon::createFromTimestamp(strtotime($item->end_date_time))->day;
-                $checkCardList->push(collect(['month' => 'current', 'day' => $day, 'color' => '#77b9b9']));
+                $tmp = $checkCardList->where('day', $day);
+                if($tmp->count() == 0) {
+                    $checkCardList->push(collect(['month' => 'current', 'day' => $day, 'color' => '#77b9b9']));
+                }
             }
         }
         $today = $now->day;