feat: 增强结果展示与用户交互

- 在 PlayerBottomNav 中新增注单导航选项
- 在 DrawResultDetailScreen 中添加高亮显示用户命中号码的功能,并显示个人派彩信息
- 在 DrawResultsListScreen 中引入 JackpotResultsStrip 组件以展示奖池信息
- 在 TwentyThreeResultsGrid 中实现命中号码的高亮效果,提升用户体验
This commit is contained in:
2026-05-11 15:40:42 +08:00
parent 1922a29f49
commit 377e03e167
16 changed files with 922 additions and 17 deletions

49
src/api/ticket-items.ts Normal file
View File

@@ -0,0 +1,49 @@
import { lotteryRequest } from "@/lib/lottery-http";
import { API_V1_PREFIX } from "@/api/paths";
import type {
TicketDrawMyMatchPayload,
TicketItemDetailPayload,
TicketItemsListPayload,
} from "@/types/api/ticket-items";
export type GetTicketItemsParams = {
page?: number;
per_page?: number;
draw_no?: string;
};
/** `GET /api/v1/ticket/items`(需登录) */
export function getTicketItems(
params?: GetTicketItemsParams,
): Promise<TicketItemsListPayload> {
return lotteryRequest.get<TicketItemsListPayload>(
`${API_V1_PREFIX}/ticket/items`,
{
params: {
page: params?.page,
per_page: params?.per_page,
draw_no: params?.draw_no,
},
},
);
}
/** `GET /api/v1/ticket/items/{ticket_no}`(需登录) */
export function getTicketItemDetail(
ticketNo: string,
): Promise<TicketItemDetailPayload> {
const enc = encodeURIComponent(ticketNo);
return lotteryRequest.get<TicketItemDetailPayload>(
`${API_V1_PREFIX}/ticket/items/${enc}`,
);
}
/** `GET /api/v1/ticket/draws/{draw_no}/my-match`(需登录) */
export function getTicketDrawMyMatch(
drawNo: string,
): Promise<TicketDrawMyMatchPayload> {
const enc = encodeURIComponent(drawNo);
return lotteryRequest.get<TicketDrawMyMatchPayload>(
`${API_V1_PREFIX}/ticket/draws/${enc}/my-match`,
);
}