添加比赛卡片的联赛键,优化实时比分请求参数,调整比分显示样式
This commit is contained in:
@@ -377,6 +377,7 @@ export default function HomeScreen() {
|
|||||||
fav: false,
|
fav: false,
|
||||||
sportId: sportId,
|
sportId: sportId,
|
||||||
isLive: true,
|
isLive: true,
|
||||||
|
leagueKey: item.league_key,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -410,7 +410,7 @@ const styles = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
scoreValue: {
|
scoreValue: {
|
||||||
color: "#000",
|
color: "#000",
|
||||||
fontSize: 30,
|
fontSize: 25,
|
||||||
fontWeight: "700",
|
fontWeight: "700",
|
||||||
lineHeight: 30,
|
lineHeight: 30,
|
||||||
letterSpacing: 1,
|
letterSpacing: 1,
|
||||||
|
|||||||
@@ -70,9 +70,20 @@ export function MatchCard({
|
|||||||
const handlePress = () => {
|
const handlePress = () => {
|
||||||
if (onPress) {
|
if (onPress) {
|
||||||
onPress(match);
|
onPress(match);
|
||||||
|
} else {
|
||||||
|
if (isLive) {
|
||||||
|
router.push({
|
||||||
|
pathname: "/live-detail/[id]",
|
||||||
|
params: {
|
||||||
|
id: match.id,
|
||||||
|
league_id: match.leagueId?.toString() || "",
|
||||||
|
sport_id: match.sportId?.toString() || "",
|
||||||
|
},
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
router.push(`/match-detail/${match.id}`);
|
router.push(`/match-detail/${match.id}`);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const toggleFavorite = async () => {
|
const toggleFavorite = async () => {
|
||||||
|
|||||||
@@ -355,7 +355,7 @@ const styles = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
scoreValue: {
|
scoreValue: {
|
||||||
color: "#000",
|
color: "#000",
|
||||||
fontSize: 30,
|
fontSize: 25,
|
||||||
fontWeight: "700",
|
fontWeight: "700",
|
||||||
lineHeight: 30,
|
lineHeight: 30,
|
||||||
letterSpacing: 1,
|
letterSpacing: 1,
|
||||||
|
|||||||
@@ -207,6 +207,11 @@ export const fetchLiveScore = async (
|
|||||||
leagueId?: number,
|
leagueId?: number,
|
||||||
timezone?: string
|
timezone?: string
|
||||||
): Promise<LiveScoreMatch[]> => {
|
): Promise<LiveScoreMatch[]> => {
|
||||||
|
console.log("Fetching live scores with params:", {
|
||||||
|
sportId,
|
||||||
|
leagueId,
|
||||||
|
timezone,
|
||||||
|
});
|
||||||
try {
|
try {
|
||||||
const params: { sport_id: number; league_id?: number; timezone?: string } =
|
const params: { sport_id: number; league_id?: number; timezone?: string } =
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export interface Match {
|
|||||||
awayTeamKey?: string;
|
awayTeamKey?: string;
|
||||||
awayTeamLogo?: string;
|
awayTeamLogo?: string;
|
||||||
leagueName?: string;
|
leagueName?: string;
|
||||||
leagueKey?: string;
|
leagueKey?: number;
|
||||||
leagueLogo?: string;
|
leagueLogo?: string;
|
||||||
countryName?: string;
|
countryName?: string;
|
||||||
countryKey?: string;
|
countryKey?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user