Browse Source

分享图片

Silent 6 years ago
parent
commit
13a113d675
1 changed files with 4 additions and 1 deletions
  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;