This commit is contained in:
张成
2026-02-05 23:23:21 +08:00
parent ebb7116c25
commit 969066591c
12 changed files with 137 additions and 26 deletions

View File

@@ -446,6 +446,17 @@ const ListPageContent: React.FC<ListPageContentProps> = ({
});
};
// 处理重新定位
const handleRelocate = async (location) => {
try {
// 位置已更新到后端,刷新列表数据
await getMatchesData();
await fetchGetGamesCount();
} catch (error) {
console.error("刷新列表失败:", error);
}
};
const handleSearchClick = () => {
navigateTo({
url: "/game_pages/search/index",
@@ -508,7 +519,7 @@ const ListPageContent: React.FC<ListPageContentProps> = ({
// 判定是否显示"暂无球局"页面
// 条件:省份不是上海 或 (已加载完成且球局数量为0)
const shouldShowNoGames = province !== "上海";
const shouldShowNoGames = province !== "上海";
return (
<>
@@ -559,6 +570,7 @@ const ListPageContent: React.FC<ListPageContentProps> = ({
quickValue={distanceQuickFilter?.order}
districtValue={distanceQuickFilter?.district}
onMenuVisibleChange={handleDistanceFilterVisibleChange}
onRelocate={handleRelocate}
/>
</View>
</View>