소스 검색

分享图片

Silent 7 년 전
부모
커밋
13a113d675
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  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;