87 lines
2.5 KiB
TypeScript
87 lines
2.5 KiB
TypeScript
import request from '@/utils/request'
|
|
|
|
export interface MatchLiveStreamOption {
|
|
id?: number | string
|
|
title?: string
|
|
name?: string
|
|
label?: string
|
|
source_name?: string
|
|
quality?: string
|
|
url?: string
|
|
play_url?: string
|
|
play_url_m3u8?: string
|
|
play_url_hd_m3u8?: string
|
|
play_url_flv?: string
|
|
play_url_hd_flv?: string
|
|
default_play_url?: string
|
|
live_url?: string
|
|
source_url?: string
|
|
fetch_status?: string | number
|
|
last_fetch_at?: string | number
|
|
update_time?: string | number
|
|
stream_options?: MatchLiveStreamOption[]
|
|
[key: string]: any
|
|
}
|
|
|
|
export interface MatchLiveLineItem {
|
|
id?: number | string
|
|
title?: string
|
|
name?: string
|
|
label?: string
|
|
live_tag?: string
|
|
source_name?: string
|
|
status?: string | number
|
|
status_text?: string
|
|
status_desc?: string
|
|
update_time?: string | number
|
|
updated_at?: string | number
|
|
source_url?: string
|
|
default_play_url?: string
|
|
play_url_m3u8?: string
|
|
play_url_hd_m3u8?: string
|
|
play_url_flv?: string
|
|
play_url_hd_flv?: string
|
|
play_url?: string
|
|
live_url?: string
|
|
fetch_status?: string | number
|
|
last_fetch_at?: string | number
|
|
stream_options?: MatchLiveStreamOption[]
|
|
[key: string]: any
|
|
}
|
|
|
|
export function getMatchList(data?: Record<string, any>) {
|
|
return request.get({ url: '/match/lists', data: data }, { withToken: false })
|
|
}
|
|
|
|
export function getMatchDetail(data: { id: number }) {
|
|
return request.get({ url: '/match/detail', data: data }, { withToken: false })
|
|
}
|
|
|
|
export function getSportTypes() {
|
|
return request.get({ url: '/match/sportTypes' }, { withToken: false })
|
|
}
|
|
|
|
export function getMatchLeagues(data?: { sport_type?: number }) {
|
|
return request.get({ url: '/match/leagues', data: data }, { withToken: false })
|
|
}
|
|
|
|
export function getMatchLiveText(data: { match_id: number; last_msg_id?: number }) {
|
|
return request.get({ url: '/match/liveText', data: data }, { withToken: false })
|
|
}
|
|
|
|
export function getMatchLineup(data: { match_id: number }) {
|
|
return request.get({ url: '/match/lineup', data: data }, { withToken: false })
|
|
}
|
|
|
|
export function getWorldCupStandings() {
|
|
return request.get({ url: '/match/worldCupStandings' }, { withToken: false })
|
|
}
|
|
|
|
export function getWorldCupRankings(data: { type: 'goals' | 'assists' }) {
|
|
return request.get({ url: '/match/worldCupRankings', data }, { withToken: false })
|
|
}
|
|
|
|
export function getWorldCupSchedule() {
|
|
return request.get({ url: '/match/worldCupSchedule' }, { withToken: false })
|
|
}
|