From 2fbaec6b4320c2bad0323aa51791a2a294bfa702 Mon Sep 17 00:00:00 2001 From: zhangjing1 Date: Fri, 27 Mar 2026 10:59:15 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"fix(home):=20=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E6=A0=8F=E5=9F=8E=E5=B8=82=E4=BC=98=E5=85=88=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=20LBS=20=E5=AE=9A=E4=BD=8D"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 08af61d0091bd65e0c6d9eeab05b26dcd97d09b8. --- src/pages/custom/custom-page.js | 3 +-- src/pages/home/wgts/home-header.js | 6 +----- src/pages/index.js | 4 +--- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/pages/custom/custom-page.js b/src/pages/custom/custom-page.js index b983804f9..210e41c18 100644 --- a/src/pages/custom/custom-page.js +++ b/src/pages/custom/custom-page.js @@ -43,8 +43,7 @@ function CustomPage(props) { const loginRef = useRef() const router = useRouter() const { location, address } = useSelector((state) => state.user) - const nearbyText = - location?.city || location?.province || address?.city || '' + const nearbyText = address?.city || location?.city || '' useEffect(() => { fetch() diff --git a/src/pages/home/wgts/home-header.js b/src/pages/home/wgts/home-header.js index 17b47ccda..b59386cb0 100644 --- a/src/pages/home/wgts/home-header.js +++ b/src/pages/home/wgts/home-header.js @@ -46,11 +46,7 @@ function WgtHomeHeader(props) { } }} > - - {location?.address || - [location?.province, location?.city, location?.district].filter(Boolean).join('') || - '选择地区'} - + {location?.address || '北京市北京市昌平区'} )} diff --git a/src/pages/index.js b/src/pages/index.js index 0bc85c5ce..4c13d983e 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -90,9 +90,7 @@ function Home() { const showAdv = useSelector((member) => member.user.showAdv) const { location, address } = useSelector((state) => state.user) - /** 导航栏城市:优先跟随 LBS 定位,与「选择商家」页一致;勿用收货地址盖住当前定位 */ - const nearbyText = - location?.city || location?.province || address?.city || '' + const nearbyText = address?.city || location?.city || '' const { setNavigationBarTitle } = useNavigation() const { updateAddress } = useLocation() const locationKeyRef = useRef('')