1
This commit is contained in:
@@ -13,11 +13,20 @@ import DistanceQuickFilter from "@/components/DistanceQuickFilter";
|
|||||||
import { withAuth } from "@/components";
|
import { withAuth } from "@/components";
|
||||||
// import img from "@/config/images";
|
// import img from "@/config/images";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const ListPage = () => {
|
const ListPage = () => {
|
||||||
|
|
||||||
// 从 store 获取数据和方法
|
// 从 store 获取数据和方法
|
||||||
const store = useListStore() || {};
|
const store = useListStore() || {};
|
||||||
|
|
||||||
const { statusNavbarHeightInfo, location = {} } = useGlobalState() || {};
|
const { statusNavbarHeightInfo, location = {}, getCurrentLocationInfo } = useGlobalState() || {};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getCurrentLocationInfo?.();
|
||||||
|
}, [getCurrentLocationInfo]);
|
||||||
|
|
||||||
const { totalHeight } = statusNavbarHeightInfo || {};
|
const { totalHeight } = statusNavbarHeightInfo || {};
|
||||||
const {
|
const {
|
||||||
isShowFilterPopup,
|
isShowFilterPopup,
|
||||||
@@ -53,6 +62,7 @@ const ListPage = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
if (location?.address) {
|
if (location?.address) {
|
||||||
// 保存位置
|
// 保存位置
|
||||||
updateState({ location });
|
updateState({ location });
|
||||||
@@ -111,7 +121,7 @@ const ListPage = () => {
|
|||||||
updateFilterOptions(params);
|
updateFilterOptions(params);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSearchChange = () => {};
|
const handleSearchChange = () => { };
|
||||||
|
|
||||||
// 距离筛选
|
// 距离筛选
|
||||||
const handleDistanceOrQuickChange = (name, value) => {
|
const handleDistanceOrQuickChange = (name, value) => {
|
||||||
@@ -135,9 +145,8 @@ const ListPage = () => {
|
|||||||
<CustomerNavBar />
|
<CustomerNavBar />
|
||||||
<View className={styles.listPage}>
|
<View className={styles.listPage}>
|
||||||
<View
|
<View
|
||||||
className={`${styles.listTopSearchWrapper} ${
|
className={`${styles.listTopSearchWrapper} ${isScrollTop ? styles.isScroll : ""
|
||||||
isScrollTop ? styles.isScroll : ""
|
}`}
|
||||||
}`}
|
|
||||||
>
|
>
|
||||||
<SearchBar
|
<SearchBar
|
||||||
handleFilterIcon={toggleShowPopup}
|
handleFilterIcon={toggleShowPopup}
|
||||||
|
|||||||
Reference in New Issue
Block a user