feat: 增强大厅与结果展示功能
- 在 .env.example 中新增可选配置项 NEXT_PUBLIC_LOTTERY_PLAY_CURRENCY - 在 API 模块中导出 getPlayEffective 函数 - 在 HallScreen 组件中引入 HallPlayCatalogPanel 以展示玩法目录 - 在多个屏幕组件中使用 queueMicrotask 优化数据加载逻辑 - 在 lottery-locale.ts 中新增 getLotteryRequestLocale 函数以支持语言选择 - 在类型定义中新增与玩法相关的类型导出
This commit is contained in:
@@ -16,3 +16,11 @@ export type {
|
||||
WalletLogsData,
|
||||
WalletPendingTransfer,
|
||||
} from "./wallet-logs";
|
||||
export type {
|
||||
PlayEffectiveConfigSlice,
|
||||
PlayEffectiveOddsSlice,
|
||||
PlayEffectivePayload,
|
||||
PlayEffectivePlayRow,
|
||||
PlayEffectiveRiskCapRow,
|
||||
PlayEffectiveVersionHead,
|
||||
} from "./play-effective";
|
||||
|
||||
62
src/types/api/play-effective.ts
Normal file
62
src/types/api/play-effective.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
/** `GET /api/v1/play/effective` → `data` */
|
||||
|
||||
export type PlayEffectiveVersionHead = {
|
||||
id: number;
|
||||
version_no: number;
|
||||
effective_at: string | null;
|
||||
};
|
||||
|
||||
export type PlayEffectiveConfigSlice = {
|
||||
is_enabled: boolean;
|
||||
min_bet_amount: number;
|
||||
max_bet_amount: number;
|
||||
display_order: number;
|
||||
rule_text_zh: string | null;
|
||||
rule_text_en: string | null;
|
||||
rule_text_ne: string | null;
|
||||
extra_config_json: unknown;
|
||||
};
|
||||
|
||||
export type PlayEffectiveOddsSlice = {
|
||||
prize_scope: string;
|
||||
odds_value: number;
|
||||
rebate_rate: string;
|
||||
commission_rate: string;
|
||||
currency_code: string;
|
||||
extra_config_json: unknown;
|
||||
/** 赔率乘数小数(与 odds_value/10000 一致) */
|
||||
odds_multiplier?: number;
|
||||
};
|
||||
|
||||
export type PlayEffectivePlayRow = {
|
||||
play_code: string;
|
||||
category: string;
|
||||
dimension: number | null;
|
||||
bet_mode: string | null;
|
||||
display_name_zh: string | null;
|
||||
display_name_en: string | null;
|
||||
display_name_ne: string | null;
|
||||
sort_order: number;
|
||||
supports_multi_number: boolean;
|
||||
master_enabled: boolean;
|
||||
config: PlayEffectiveConfigSlice | null;
|
||||
odds: PlayEffectiveOddsSlice | null;
|
||||
};
|
||||
|
||||
export type PlayEffectiveRiskCapRow = {
|
||||
draw_id: number | null;
|
||||
normalized_number: string;
|
||||
cap_amount: number;
|
||||
cap_type: string;
|
||||
};
|
||||
|
||||
export type PlayEffectivePayload = {
|
||||
currency_code: string;
|
||||
effective_versions: {
|
||||
play_config: PlayEffectiveVersionHead;
|
||||
odds: PlayEffectiveVersionHead;
|
||||
risk_cap: PlayEffectiveVersionHead;
|
||||
};
|
||||
plays: PlayEffectivePlayRow[];
|
||||
risk_cap_items: PlayEffectiveRiskCapRow[];
|
||||
};
|
||||
Reference in New Issue
Block a user