|
|
|
|
@ -70,7 +70,9 @@ class CalendarsController extends BaseController
|
|
|
|
|
// 本年日历天数
|
|
|
|
|
$yearDayCalendar = Calendar::where(function ($query) use ($all) {
|
|
|
|
|
if (isset($all['month'])) {
|
|
|
|
|
$query->where('start_time', 'like', $all['month'] . '%');
|
|
|
|
|
// 获取$all['month']的年份部分
|
|
|
|
|
$year = date('Y', strtotime($all['month']));
|
|
|
|
|
$query->where('start_time', 'like', $year . '%');
|
|
|
|
|
}
|
|
|
|
|
})->where('is_count_days', 1)->sum('days');
|
|
|
|
|
return $this->success(compact('list', 'monthDayCalendar', 'yearDayCalendar'));
|
|
|
|
|
|