This commit is contained in:
Your Name
2026-08-13 16:37:37 +08:00
parent cbe71905c0
commit 21790e35f4
11 changed files with 1708 additions and 434 deletions
@@ -150,7 +150,7 @@ class FirstVisitDoctorDashboardLogic
{
$today = date('Y-m-d');
$type = (string) ($params['time_type'] ?? 'month');
if (!in_array($type, ['today', 'week', 'month', 'custom'], true)) {
if (!in_array($type, ['today', 'yesterday', 'week', 'month', 'custom'], true)) {
$type = 'month';
}
@@ -175,6 +175,11 @@ class FirstVisitDoctorDashboardLogic
if ($type === 'today') {
return ['type' => 'today', 'label' => '今日', 'start' => $today, 'end' => $today];
}
if ($type === 'yesterday') {
$yesterday = date('Y-m-d', strtotime('-1 day'));
return ['type' => 'yesterday', 'label' => '昨天', 'start' => $yesterday, 'end' => $yesterday];
}
if ($type === 'week') {
return [
'type' => 'week', 'label' => '本周',