From 7724314530f084f2e9769cfe4c3ed0ca68c0ccd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=88=90?= Date: Mon, 8 Sep 2025 13:20:44 +0800 Subject: [PATCH] 1 --- src/pages/list/index.tsx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/pages/list/index.tsx b/src/pages/list/index.tsx index 46f7c5e..58caa2f 100644 --- a/src/pages/list/index.tsx +++ b/src/pages/list/index.tsx @@ -13,11 +13,20 @@ import DistanceQuickFilter from "@/components/DistanceQuickFilter"; import { withAuth } from "@/components"; // import img from "@/config/images"; + + + const ListPage = () => { + // 从 store 获取数据和方法 const store = useListStore() || {}; - const { statusNavbarHeightInfo, location = {} } = useGlobalState() || {}; + const { statusNavbarHeightInfo, location = {}, getCurrentLocationInfo } = useGlobalState() || {}; + + useEffect(() => { + getCurrentLocationInfo?.(); + }, [getCurrentLocationInfo]); + const { totalHeight } = statusNavbarHeightInfo || {}; const { isShowFilterPopup, @@ -53,6 +62,7 @@ const ListPage = () => { }); useEffect(() => { + if (location?.address) { // 保存位置 updateState({ location }); @@ -111,7 +121,7 @@ const ListPage = () => { updateFilterOptions(params); }; - const handleSearchChange = () => {}; + const handleSearchChange = () => { }; // 距离筛选 const handleDistanceOrQuickChange = (name, value) => { @@ -135,9 +145,8 @@ const ListPage = () => {