You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
121 lines
2.0 KiB
121 lines
2.0 KiB
|
1 month ago
|
/**
|
||
|
|
* 首页相关的数据类型定义
|
||
|
|
*/
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 轮播图数据
|
||
|
|
*/
|
||
|
|
export interface Banner {
|
||
|
|
id: string;
|
||
|
|
subject: string; // 图片URL
|
||
|
|
link_type: number; // 1: 外链, 2: 内部路由
|
||
|
|
content: string; // 链接内容
|
||
|
|
title?: string;
|
||
|
|
description?: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 公告数据
|
||
|
|
*/
|
||
|
|
export interface Notice {
|
||
|
|
id: string;
|
||
|
|
title: string;
|
||
|
|
content: string;
|
||
|
|
content_type: number; // 1: 文本, 2: 图片, 3: 链接
|
||
|
|
create_time: string;
|
||
|
|
formatDate?: string;
|
||
|
|
is_save_pic?: boolean;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 游戏分类
|
||
|
|
*/
|
||
|
|
export interface GameCategory {
|
||
|
|
id: number;
|
||
|
|
key: string;
|
||
|
|
name: string;
|
||
|
|
icon: string;
|
||
|
|
logo?: string;
|
||
|
|
big_type?: number;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 游戏数据
|
||
|
|
*/
|
||
|
|
export interface Game {
|
||
|
|
id: string;
|
||
|
|
play_id: number;
|
||
|
|
upper_play_id?: number;
|
||
|
|
play_up_name: string; // 游戏平台名称
|
||
|
|
play_cname?: string; // 游戏子类名称
|
||
|
|
logo3_img_url?: string; // 游戏图标
|
||
|
|
icon?: string;
|
||
|
|
big_type: number; // 游戏大类型
|
||
|
|
mainType?: number;
|
||
|
|
index?: number;
|
||
|
|
description?: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 高奖金游戏数据
|
||
|
|
*/
|
||
|
|
export interface HighPrizeGame extends Game {
|
||
|
|
payout_amount: number; // 派彩金额
|
||
|
|
bet_amount: number; // 下注金额
|
||
|
|
odds: number; // 赔率
|
||
|
|
cust_name: string; // 用户名
|
||
|
|
avatar?: string; // 用户头像
|
||
|
|
update_time: string; // 更新时间
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 快速导航项
|
||
|
|
*/
|
||
|
|
export interface NavItem {
|
||
|
|
id: string;
|
||
|
|
name: string;
|
||
|
|
icon: string;
|
||
|
|
action: string; // 导航动作
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 首页数据响应
|
||
|
|
*/
|
||
|
|
export interface HomePageData {
|
||
|
|
banners: Banner[];
|
||
|
|
notices: Notice[];
|
||
|
|
categories: GameCategory[];
|
||
|
|
games: Game[];
|
||
|
|
highPrizeGames: HighPrizeGame[];
|
||
|
|
navItems: NavItem[];
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* API 响应格式
|
||
|
|
*/
|
||
|
|
export interface ApiResponse<T = any> {
|
||
|
|
code: number;
|
||
|
|
message: string;
|
||
|
|
data: T;
|
||
|
|
type?: 'success' | 'error';
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 分页参数
|
||
|
|
*/
|
||
|
|
export interface PaginationParams {
|
||
|
|
page: number;
|
||
|
|
page_size: number;
|
||
|
|
[key: string]: any;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 游戏列表响应
|
||
|
|
*/
|
||
|
|
export interface GameListResponse {
|
||
|
|
games: Game[];
|
||
|
|
total: number;
|
||
|
|
page: number;
|
||
|
|
page_size: number;
|
||
|
|
}
|