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('')