import { server } from "@/utils/client"; export type ActionType = 1 | 2 | 3 | 4 | 5 | 6 | 7 | undefined; /** * entity.HomeCategory */ export interface GroupType { category: Category[]; /** * 分类名字 */ category_name: string; /** * 隐藏模板中的厂商、类型两个标签。1:开启,2:关闭 */ hide_status: number; /** * 正序排序 */ sort: number; /** * 展示风格 展示风格,1:横排,2:竖排,3:竖排-分类左边-连续,4:竖排-分类左边-拆开 */ style_type: number; /** * @description 分组类型 * 1 普通游戏(现金+ 彩金) 2:免费币 3:重玩币" */ bet_type: 1 | 2 | 3; image: string; isAnimation?: boolean; } /** * entity.Category */ export interface Category { /** * 厂商图标 */ image: string; /** * 多语言名字 */ category_name: string; /** * 游戏列表 */ game_list: GameListRep[]; /** * 前置图标 -就是名字前面的那个小标签 */ icon: string; /** * 图标类型,1:游戏图标,2:厂商图标', */ icon_type: string; /** * 跳转ID */ jump_id: number; /** * 每页展示多少条 */ line_config_amount: number; /** * 每页条数 */ line_num: number; /** * 是否显示厂商名称 厂商模块,1:开启,2:关闭 */ show_factory_name: number; /** * 是否显示游戏类型 游戏类型,1:开启,2:关闭 */ show_game_type: number; /** * 是否显示体育模块 体育模块,1:开启,2:关闭 */ show_sport: number; /** * 特殊显示 特殊显示,1:开启,2:关闭 */ special_show: string; /** * 标签 */ tag: string; /** * 当前分类的数量 */ to_tal: number; /** * 类型 1:game 2:brand 3:title */ type: number; /** * @description 分组类型 * 1 普通游戏(现金+ 彩金) 2:免费币 3:重玩币" */ bet_type: 1 | 2 | 3; } /** * entity.GameListRep */ export interface GameListRep { /** * 游戏ICON */ game_icon: string; /** * 游戏ID */ game_id: string; /** * 游戏名称 */ game_name: string; /** * 游戏名称中文 */ game_name_cn: string; /** * 游戏类型 */ game_type: string; /** * id */ id: number; /** * 厂商名字 besoft 等等 */ provider: string; /** * 时间 */ release_date: string; // 自定义demo试玩 demo?: number; // 自定义游戏类型 category_name?: string; coin_types?: number; } /** * @description 大奖展示 */ export interface PrizeTypes { amount: number; phone: string; id: number; provider: string; game_id: string; game_name: string; game_name_cn: string; release_date: string; game_icon: string; game_type: string; coin_types: number; } export const getGamesApi = () => { return server.post({ url: "/v1/api/front/game_list", data: {}, }); }; /** * @description * entity.GameInfo */ export interface GameInfo { game_url: string; brand_id: string; } /** * form.LoginGameReq */ export interface GameRequest { /** * 玩家渠道,pc/mobile */ channel?: string; /** * 用于显示全画面(部份游戏提供此功能) */ full_screen?: boolean; /** * 游戏列表ID */ id: string; /** * 语言,cn/en */ language?: string; /** * 用于主页按钮和重新导向 URL (部份游戏提供此功能) */ return_url?: string; mode?: 1 | 2 | 3; } export const getGameDetailApi = (data: GameRequest) => { return server.post({ url: "/v1/api/front/game_info_by_id", data, }); }; export interface BannerRep { /** * 点击参数 */ action_params?: string; /** * 点击功能, 1:无功能,2:跳转外部链接,3:跳转页面,4:跳转弹窗,5:跳转打开游戏,6:跳转Live Chat客服,7:跳转内部文档 */ action_type?: ActionType; /** * '轮播地址({"en": "https://www.baidu.com", "zh": "https://www.baidu.com"})', */ content?: string; /** * id */ id?: number; /** * 显示平台,1:全部,2:手机,3:PC */ show_platform?: number; /** * sort 排序 */ sort?: number; is_badge?: boolean; } export interface Content { image?: string; lang?: string; text?: string; title?: string; word?: string; } export interface NoticeRep { renter_id: number; id: number; send_time: number; action_type: ActionType; action_params: string; is_window: 1 | 2; desc: string; notice_type: string; status: number; content: Content; is_read: boolean; } export interface PromotionRep extends Omit { content: Content; activity_id: number; pop_type: 1 | 2 | 3; //1一天一次;2登录弹出;3返回大厅弹出 content_type: 1 | 2 | 3; //1图片,2文本,3方法 } export type SearchProps = { search_game_name?: string; current_page: number; page_size: number; use_page: boolean; provider_id?: number; category_id?: number; }; // 获取游戏列表-(跳转 搜索) export const searchGameListApi = (props: SearchProps) => { return server.post({ url: "/v1/api/front/game_list_search", data: props, }); }; /** * 获取免费游戏列表 * POST /v1/api/front/game_list_free * 接口ID:240705427 * 接口地址:https://app.apifox.com/link/project/4790544/apis/api-240705427 */ export const getFreeGamesApi = (props: SearchProps) => { return server.post({ url: "/v1/api/front/game_list_free", data: props, }); }; /** * 获取重玩游戏列表 * POST /v1/api/front/game_list_again * 接口ID:240731148 * 接口地址:https://app.apifox.com/link/project/4790544/apis/api-240731148 */ export interface EmailAttachItem { coin_type: Number; amount: Number; } export interface EmailNoticeRep { id: number; title: string; content: string; mail_tips: string; mail_type: number; time_last: number; display_type: number; status: number; attach: EmailAttachItem[]; create_at: number; image?: string; } export const getReplayGamesApi = (props: SearchProps) => { return server.post({ url: "/v1/api/front/game_list_again", data: props, }); }; //获取公告系统 export interface GlobalNoticeRep extends Omit { content?: Content; send_time: number; send_user_time: number; } export const getGlobalNoticeApi = () => { return server.post({ url: "/v1/api/front/notice_list", data: {}, }); }; export const getGlobalUserNoticeApi = () => { return server.post({ url: "/v1/api/front/notice_user_list", data: {}, }); }; // 系统通知信息回执 // POST /v1/api/front/notice_user_receipt // 接口ID:224339957 // 接口地址:https://app.apifox.com/link/project/4790544/apis/api-224339957 export const updateGlobalNoticeApi = (notice_id: number) => { return server.post({ url: "/v1/api/front/notice_user_receipt", data: { notice_id }, }); }; // 用户站内信回执 // POST /v1/api/front/letter_user_receipt // 接口ID:224339829 // 接口地址:https://app.apifox.com/link/project/4790544/apis/api-224339829 export const updateUserNoticeApi = (letter_id: number) => { return server.post({ url: "/v1/api/front/letter_user_receipt", data: { letter_id }, }); }; // 获取中奖配置列表 export const gamesNoticeWinApi = () => { return server.post({ url: "/v1/api/front/games_notice_win", }); };