fix(pl): 证书齐备按计划日期正序,并默认未齐备与近期日期。

Web 与小程序共用列表接口,打开时只看未齐备,计划日期从昨天起共 8 天;同时让移动端筛选下拉从筛选条向下展开。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
wuzilongandCursor committed 2026-11-05 12:07:26 +08:00
1 parent 13cf2e216d
commit da8499bc92
8 files changed
+202 -7

No files matched your search

@@ -0,0 +1,12 @@
function formatYmd(date: Date) {
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
return `${date.getFullYear()}-${month}-${day}`
}
/** 昨天到昨天之后第 7 天,含首尾。今天是 11 月 5 日时为 11 月 4 日~11 月 11 日。 */
export function certReadyDefaultPlanDates(today = new Date()) {
const start = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 1)
const end = new Date(start.getFullYear(), start.getMonth(), start.getDate() + 7)
return { from: formatYmd(start), to: formatYmd(end) }
}