feat: 更新依赖与增强功能
- 在 package.json 和 package-lock.json 中新增 laravel-echo 和 pusher-js 依赖 - 在 API 模块中新增 draw 相关函数的导出 - 在 PlayerAppShell 组件中引入 PlayerBottomNav 以增强底部导航 - 在 HallScreen 组件中引入 HallDrawPanel 以展示当前期号
This commit is contained in:
27
src/types/api/draw-current.ts
Normal file
27
src/types/api/draw-current.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
/** `GET /api/v1/draw/current` 的 `data`(可能为 `null`) */
|
||||
export type DrawCurrentResultItem = {
|
||||
prize_type: string;
|
||||
prize_index: number;
|
||||
number_4d: string;
|
||||
suffix_3d: string | null;
|
||||
suffix_2d: string | null;
|
||||
head_digit: number | null;
|
||||
tail_digit: number | null;
|
||||
};
|
||||
|
||||
export type DrawCurrentPayload = {
|
||||
draw_no: string;
|
||||
business_date: string;
|
||||
sequence_no: number;
|
||||
status: string;
|
||||
start_time: string | null;
|
||||
close_time: string | null;
|
||||
draw_time: string | null;
|
||||
seconds_to_close: number;
|
||||
seconds_to_draw: number;
|
||||
cooling_end_time: string | null;
|
||||
seconds_remaining_in_cooldown: number | null;
|
||||
result_items?: DrawCurrentResultItem[];
|
||||
result_version?: number;
|
||||
result_source?: string | null;
|
||||
};
|
||||
41
src/types/api/draw-results.ts
Normal file
41
src/types/api/draw-results.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
/** 与 PRD `results` 对象键名一致 */
|
||||
export type DrawResultsNumbers = {
|
||||
"1st": string;
|
||||
"2nd": string;
|
||||
"3rd": string;
|
||||
starter: string[];
|
||||
consolation: string[];
|
||||
};
|
||||
|
||||
export type DrawResultListItem = {
|
||||
draw_id: string;
|
||||
draw_no: string;
|
||||
business_date: string;
|
||||
draw_time: string | null;
|
||||
draw_time_iso?: string | null;
|
||||
result_version: number;
|
||||
result_source: string | null;
|
||||
results: DrawResultsNumbers;
|
||||
result_items: Array<{
|
||||
prize_type: string;
|
||||
prize_index: number;
|
||||
number_4d: string;
|
||||
suffix_3d: string | null;
|
||||
suffix_2d: string | null;
|
||||
head_digit: number | null;
|
||||
tail_digit: number | null;
|
||||
}>;
|
||||
};
|
||||
|
||||
export type DrawResultsListPayload = {
|
||||
items: DrawResultListItem[];
|
||||
total: number;
|
||||
page: number;
|
||||
per_page: number;
|
||||
last_page: number;
|
||||
};
|
||||
|
||||
export type DrawResultDetailPayload = DrawResultListItem & {
|
||||
previous_draw_no: string | null;
|
||||
next_draw_no: string | null;
|
||||
};
|
||||
Reference in New Issue
Block a user