feat: 补齐 spec 遗漏 — themes/history 接口 + cover_count/coverCount/daysSinceLastAppear

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Sakurasan
2026-08-10 21:08:39 +08:00
co-authored by Claude
parent ac985a2140
commit 258fc9184d
5 changed files with 42 additions and 3 deletions
+2
View File
@@ -4,9 +4,11 @@ import { getApiBaseUrl } from "@/lib/api-client";
export interface ActiveCoreStock {
stockCode: string;
stockName: string;
coverCount: number | null; // 覆盖题材数
dailyGains: Record<string, number | null>; // 日期 -> 当日涨幅(可空)
appearCount: number;
lastAppear: string | null;
daysSinceLastAppear: number; // 最近上榜距窗口最新交易日的自然日差
}
export interface ActiveCoreStocksResponse {
+4
View File
@@ -68,6 +68,7 @@ function CoreStocksPage() {
{d.slice(5)}
</th>
))}
<th scope="col" className="px-2 py-2 text-right font-medium" title="覆盖题材数"></th>
<th scope="col" className="px-2 py-2 text-right font-medium"></th>
</tr>
</thead>
@@ -87,6 +88,9 @@ function CoreStocksPage() {
</td>
);
})}
<td className="px-2 py-1.5 text-right tabular-nums whitespace-nowrap text-muted-foreground">
{s.coverCount ?? "·"}
</td>
<td className="px-2 py-1.5 text-right tabular-nums whitespace-nowrap">
<span className="inline-flex items-center gap-0.5 text-orange-500">
<Flame className="h-3 w-3" />