首页只调用必须的接口

This commit is contained in:
张成
2025-12-08 13:32:12 +08:00
parent 175e5814e3
commit a8dca0dd71
10 changed files with 245 additions and 92 deletions

View File

@@ -231,13 +231,13 @@ const HomeNavbar = (props: IProps) => {
// 处理城市切换(仅刷新数据,不保存缓存)
const handleCityChangeWithoutCache = async () => {
// 切换城市后,同时更新两个列表接口获取数据
// 切换城市后,同时更新两个列表接口获取数据,传入当前的 area
if (refreshBothLists) {
await refreshBothLists();
await refreshBothLists(area);
}
// 更新球局数量
// 更新球局数量,传入当前的 area确保接口请求的地址与界面显示一致
if (fetchGetGamesCount) {
await fetchGetGamesCount();
await fetchGetGamesCount(area);
}
};