优化详情显示

This commit is contained in:
xianyi
2026-01-13 16:46:16 +08:00
parent 74868f0288
commit c7c6585c7c
8 changed files with 564 additions and 31 deletions

View File

@@ -30,6 +30,50 @@ export interface ApiListResponse<T> {
total: number;
}
export interface GoalEvent {
time: string;
home_scorer?: string;
away_scorer?: string;
score?: string;
comment?: string;
}
export interface CardEvent {
time: string;
home_fault?: string;
away_fault?: string;
card?: string;
comment?: string;
}
export interface SubstituteEvent {
time: string;
home_scorer?: string;
away_scorer?: string;
home_assist?: string;
away_assist?: string;
home_scorer_out?: string;
away_scorer_out?: string;
comment?: string;
}
export interface MatchEvents {
goalscorers: GoalEvent[];
cards: CardEvent[];
substitutes: SubstituteEvent[];
}
export interface Player {
// AllSports API 常见字段
player?: string; // 有些接口用 player
player_name?: string; // 有些接口用 player_name
name?: string; // 兜底
player_number?: number | string;
number?: number | string;
player_type?: string; // 位置/角色,例如 Goalkeepers
position?: string; // 兜底位置字段
}
export interface MatchDetailData {
events: any[];
match: {
@@ -73,5 +117,10 @@ export interface MatchDetailData {
eventType: string;
eventToss: string;
eventManOfMatch: string;
events?: MatchEvents;
players?: {
home_team?: Player[];
away_team?: Player[];
};
};
}