首页只调用必须的接口
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user