123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380 |
- 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<GroupType[]>({
- 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<GameInfo>({
- 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<BannerRep, "content"> {
- 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<GameListRep[]>({
- 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<GameListRep[]>({
- 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<GameListRep[]>({
- url: "/v1/api/front/game_list_again",
- data: props,
- });
- };
- //获取公告系统
- export interface GlobalNoticeRep extends Omit<NoticeRep, "content"> {
- content?: Content;
- send_time: number;
- send_user_time: number;
- }
- export const getGlobalNoticeApi = () => {
- return server.post<NoticeRep[], { summery: { unread: number; promotion_count: number } }>({
- url: "/v1/api/front/notice_list",
- data: {},
- });
- };
- export const getGlobalUserNoticeApi = () => {
- return server.post<NoticeRep[], { summery: { unread: number } }>({
- 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",
- });
- };
|