feat(player): 完善 H5 投注端与 API 演示数据

- 球赛/串关/优胜冠军、赛事详情、历史投注与个人资料编辑
- 固定顶栏、公告与底栏,仅内容区滚动
- 底部导航与站点 favicon 使用 logo,登录页精简
- API 种子、冠军盘与历史注单增强

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-02 17:18:11 +08:00
parent 7af2e418c3
commit b5dca1bfb1
75 changed files with 7077 additions and 384 deletions

View File

@@ -32,10 +32,18 @@ export function generateBatchNo(prefix: string): string {
return `${prefix}${ts}`;
}
function isDecimalLike(obj: object): obj is { toJSON: () => string } {
return (
typeof (obj as { toJSON?: unknown }).toJSON === 'function' &&
typeof (obj as { toFixed?: unknown }).toFixed === 'function'
);
}
export function serializeBigInt(obj: unknown): unknown {
if (obj === null || obj === undefined) return obj;
if (typeof obj === 'bigint') return obj.toString();
if (obj instanceof Date) return obj.toISOString();
if (typeof obj === 'object' && isDecimalLike(obj)) return obj.toJSON();
if (Array.isArray(obj)) return obj.map(serializeBigInt);
if (typeof obj === 'object') {
const result: Record<string, unknown> = {};