使用新赔率组件
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { OddsCard } from "@/components/live-detail/odds-card";
|
||||
import { BasketballScoreTable } from "@/components/match-detail/basketball/basketball-score-table";
|
||||
import { CardsCard } from "@/components/match-detail/football/cards-card";
|
||||
import { FootballScoreTable } from "@/components/match-detail/football/football-score-table";
|
||||
@@ -7,7 +8,6 @@ import { SubstitutesCard } from "@/components/match-detail/football/substitutes-
|
||||
import { LeagueInfo } from "@/components/match-detail/league-info";
|
||||
import { MatchInfoCard } from "@/components/match-detail/match-info-card";
|
||||
import { MatchTabs } from "@/components/match-detail/match-tabs";
|
||||
import { OddsView } from "@/components/match-detail/odds/odds-view";
|
||||
import { ScoreHeader } from "@/components/match-detail/score-header";
|
||||
import { ThemedText } from "@/components/themed-text";
|
||||
import { ThemedView } from "@/components/themed-view";
|
||||
@@ -161,7 +161,31 @@ export default function MatchDetailScreen() {
|
||||
);
|
||||
}
|
||||
case "odds":
|
||||
return <OddsView sportId={sportId} matchId={data.match.ID} />;
|
||||
// 将 MatchDetailData.match 转换为 LiveScoreMatch 格式
|
||||
const matchForOdds = {
|
||||
event_key: parseInt(data.match.eventKey) || 0,
|
||||
event_date: data.match.eventDate,
|
||||
event_time: data.match.eventTime,
|
||||
event_home_team: data.match.eventHomeTeam,
|
||||
home_team_key: parseInt(data.match.homeTeamKey) || 0,
|
||||
home_team_logo: data.match.homeTeamLogo,
|
||||
event_away_team: data.match.eventAwayTeam,
|
||||
away_team_key: parseInt(data.match.awayTeamKey) || 0,
|
||||
away_team_logo: data.match.awayTeamLogo,
|
||||
event_final_result: data.match.eventFinalResult,
|
||||
event_halftime_result: data.match.eventHalftimeResult,
|
||||
event_status: data.match.eventStatus,
|
||||
event_live: data.match.eventLive,
|
||||
league_key: parseInt(data.match.leagueKey) || 0,
|
||||
league_name: data.match.leagueName,
|
||||
league_logo: data.match.leagueLogo,
|
||||
league_round: data.match.leagueRound,
|
||||
league_season: data.match.leagueSeason,
|
||||
country_name: data.match.countryName,
|
||||
country_logo: data.match.countryLogo,
|
||||
event_country_key: parseInt(data.match.eventCountryKey) || 0,
|
||||
};
|
||||
return <OddsCard sportId={sportId} match={matchForOdds} isDark={isDark} />;
|
||||
case "h2h":
|
||||
return (
|
||||
<View style={styles.emptyContent}>
|
||||
|
||||
Reference in New Issue
Block a user