ui(site-subscriptions): ends_at 快捷区间链接保留筛选上下文

This commit is contained in:
萝卜
2026-03-17 06:39:06 +08:00
parent 74a2f01651
commit 3408b13e44
2 changed files with 65 additions and 4 deletions

View File

@@ -279,10 +279,12 @@
$endsToday = now()->format('Y-m-d');
$ends7d = now()->addDays(7)->format('Y-m-d');
$ends30d = now()->addDays(30)->format('Y-m-d');
$endsQuickTodayUrl = $buildQuickFilterUrl(['ends_from' => $endsToday, 'ends_to' => $endsToday, 'page' => null]);
$endsQuick7dUrl = $buildQuickFilterUrl(['ends_from' => $endsToday, 'ends_to' => $ends7d, 'page' => null]);
$endsQuick30dUrl = $buildQuickFilterUrl(['ends_from' => $endsToday, 'ends_to' => $ends30d, 'page' => null]);
$endsQuickClearUrl = $buildQuickFilterUrl(['ends_from' => null, 'ends_to' => null, 'page' => null]);
// 到期区间快捷入口应保留当前筛选上下文status/expiry/merchant/plan/keyword/back仅覆盖 ends_from/ends_to并清空 page。
$endsQuickTodayUrl = $safeFullUrlWithQuery(['ends_from' => $endsToday, 'ends_to' => $endsToday, 'page' => null]);
$endsQuick7dUrl = $safeFullUrlWithQuery(['ends_from' => $endsToday, 'ends_to' => $ends7d, 'page' => null]);
$endsQuick30dUrl = $safeFullUrlWithQuery(['ends_from' => $endsToday, 'ends_to' => $ends30d, 'page' => null]);
$endsQuickClearUrl = $safeFullUrlWithQuery(['ends_from' => null, 'ends_to' => null, 'page' => null]);
@endphp
<a class="link" href="{!! $endsQuickTodayUrl !!}">今天到期</a>
<span class="muted"></span>