Merge branch 'feature/juguohong/20250816'
This commit is contained in:
@@ -13,7 +13,7 @@ import CourtType from "@/components/CourtType";
|
|||||||
// 玩法
|
// 玩法
|
||||||
import GamePlayType from "@/components/GamePlayType";
|
import GamePlayType from "@/components/GamePlayType";
|
||||||
import { useDictionaryActions } from "@/store/dictionaryStore";
|
import { useDictionaryActions } from "@/store/dictionaryStore";
|
||||||
import { View } from "@tarojs/components";
|
import { View, ScrollView } from "@tarojs/components";
|
||||||
|
|
||||||
const FilterPopup = (props: FilterPopupProps) => {
|
const FilterPopup = (props: FilterPopupProps) => {
|
||||||
const {
|
const {
|
||||||
@@ -91,76 +91,92 @@ const FilterPopup = (props: FilterPopupProps) => {
|
|||||||
round
|
round
|
||||||
visible={visible}
|
visible={visible}
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
style={{ marginTop: statusNavbarHeigh + "px", maxHeight: '75vh' }}
|
style={{ marginTop: statusNavbarHeigh + "px", maxHeight: '70vh' }}
|
||||||
overlayStyle={{ marginTop: statusNavbarHeigh + "px" }}
|
overlayStyle={{ marginTop: statusNavbarHeigh + "px" }}
|
||||||
zIndex={1001}
|
zIndex={1001}
|
||||||
>
|
>
|
||||||
<div className={styles.filterPopupWrapper}>
|
<View className={styles.filterPopupWrapper}>
|
||||||
{/* 日历 */}
|
{/* 可滚动的内容区域 */}
|
||||||
<View>
|
<ScrollView
|
||||||
<CalendarUI
|
scrollY
|
||||||
type="multiple"
|
enhanced
|
||||||
isBorder={true}
|
showScrollbar={false}
|
||||||
value={filterOptions?.dateRange}
|
className={styles.filterPopupContent}
|
||||||
onChange={handleDateChange}
|
style={{
|
||||||
/>
|
maxHeight: '60vh'
|
||||||
</View>
|
|
||||||
{/* 时间气泡选项 */}
|
|
||||||
|
|
||||||
<Bubble
|
|
||||||
options={timeBubbleData}
|
|
||||||
value={filterOptions?.timeSlot}
|
|
||||||
onChange={handleFilterChange}
|
|
||||||
layout="grid"
|
|
||||||
size="small"
|
|
||||||
columns={3}
|
|
||||||
name="timeSlot"
|
|
||||||
/>
|
|
||||||
|
|
||||||
{/* 范围选择 */}
|
|
||||||
<Range
|
|
||||||
min={1.0}
|
|
||||||
max={5.0}
|
|
||||||
step={0.5}
|
|
||||||
className={styles.filterPopupRange}
|
|
||||||
onChange={(value) => {
|
|
||||||
handleFilterChange("ntrp", value)
|
|
||||||
}}
|
}}
|
||||||
value={filterOptions?.ntrp}
|
onTouchMove={(e) => {
|
||||||
/>
|
// 阻止滚动穿透
|
||||||
|
e.stopPropagation();
|
||||||
{/* 场次气泡选项 */}
|
}}
|
||||||
{/* <div>
|
>
|
||||||
<TitleComponent
|
{/* 日历 */}
|
||||||
title="场地类型"
|
<View>
|
||||||
icon={<Image src={img.ICON_SITE} />}
|
<CalendarUI
|
||||||
/>
|
type="multiple"
|
||||||
|
isBorder={true}
|
||||||
|
value={filterOptions?.dateRange}
|
||||||
|
onChange={handleDateChange}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
{/* 时间气泡选项 */}
|
||||||
|
|
||||||
<Bubble
|
<Bubble
|
||||||
options={locationOptions}
|
options={timeBubbleData}
|
||||||
value={filterOptions?.site}
|
value={filterOptions?.timeSlot}
|
||||||
onChange={handleFilterChange}
|
onChange={handleFilterChange}
|
||||||
layout="grid"
|
layout="grid"
|
||||||
size="small"
|
size="small"
|
||||||
columns={3}
|
columns={3}
|
||||||
name="site"
|
name="timeSlot"
|
||||||
/>
|
/>
|
||||||
</div> */}
|
|
||||||
{/* CourtType */}
|
{/* 范围选择 */}
|
||||||
<CourtType
|
<Range
|
||||||
onChange={handleFilterChange}
|
min={1.0}
|
||||||
name="venueType"
|
max={5.0}
|
||||||
options={locationOptions}
|
step={0.5}
|
||||||
value={filterOptions?.venueType}
|
className={styles.filterPopupRange}
|
||||||
/>
|
onChange={(value) => {
|
||||||
{/* 玩法 */}
|
handleFilterChange("ntrp", value)
|
||||||
<GamePlayType
|
}}
|
||||||
onChange={handleFilterChange}
|
value={filterOptions?.ntrp}
|
||||||
name="playType"
|
/>
|
||||||
options={gamePlayOptions}
|
|
||||||
value={filterOptions?.playType}
|
{/* 场次气泡选项 */}
|
||||||
/>
|
{/* <div>
|
||||||
{/* 按钮 */}
|
<TitleComponent
|
||||||
<div className={styles.filterPopupBtnWrapper}>
|
title="场地类型"
|
||||||
|
icon={<Image src={img.ICON_SITE} />}
|
||||||
|
/>
|
||||||
|
<Bubble
|
||||||
|
options={locationOptions}
|
||||||
|
value={filterOptions?.site}
|
||||||
|
onChange={handleFilterChange}
|
||||||
|
layout="grid"
|
||||||
|
size="small"
|
||||||
|
columns={3}
|
||||||
|
name="site"
|
||||||
|
/>
|
||||||
|
</div> */}
|
||||||
|
{/* CourtType */}
|
||||||
|
<CourtType
|
||||||
|
onChange={handleFilterChange}
|
||||||
|
name="venueType"
|
||||||
|
options={locationOptions}
|
||||||
|
value={filterOptions?.venueType}
|
||||||
|
/>
|
||||||
|
{/* 玩法 */}
|
||||||
|
<GamePlayType
|
||||||
|
onChange={handleFilterChange}
|
||||||
|
name="playType"
|
||||||
|
options={gamePlayOptions}
|
||||||
|
value={filterOptions?.playType}
|
||||||
|
/>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
{/* 固定在底部的按钮区域 */}
|
||||||
|
<View className={styles.filterPopupBtnWrapper}>
|
||||||
<Button
|
<Button
|
||||||
className={styles.btn}
|
className={styles.btn}
|
||||||
type="default"
|
type="default"
|
||||||
@@ -176,8 +192,8 @@ const FilterPopup = (props: FilterPopupProps) => {
|
|||||||
>
|
>
|
||||||
显示 {gamesNum} 场球局
|
显示 {gamesNum} 场球局
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</View>
|
||||||
</div>
|
</View>
|
||||||
</Popup>
|
</Popup>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ const ListPage = () => {
|
|||||||
initialFilterSearch,
|
initialFilterSearch,
|
||||||
loadMoreMatches,
|
loadMoreMatches,
|
||||||
fetchGetGamesCount,
|
fetchGetGamesCount,
|
||||||
updateDistanceQuickFilter
|
updateDistanceQuickFilter,
|
||||||
} = store;
|
} = store;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@@ -47,6 +47,7 @@ const ListPage = () => {
|
|||||||
filterOptions,
|
filterOptions,
|
||||||
distanceQuickFilter,
|
distanceQuickFilter,
|
||||||
isShowInputCustomerNavBar,
|
isShowInputCustomerNavBar,
|
||||||
|
pageOption
|
||||||
} = listPageState || {};
|
} = listPageState || {};
|
||||||
|
|
||||||
// 防抖的滚动处理函数
|
// 防抖的滚动处理函数
|
||||||
@@ -90,6 +91,16 @@ const ListPage = () => {
|
|||||||
getLocation()
|
getLocation()
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
// 监听数据变化,如果是第一页就滚动到顶部
|
||||||
|
useEffect(() => {
|
||||||
|
if (pageOption?.page === 1 && matches?.length > 0) {
|
||||||
|
Taro.pageScrollTo({
|
||||||
|
scrollTop: 0,
|
||||||
|
duration: 300
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, [matches, pageOption?.page]);
|
||||||
|
|
||||||
// 清理定时器
|
// 清理定时器
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
return () => {
|
return () => {
|
||||||
@@ -226,7 +237,9 @@ const ListPage = () => {
|
|||||||
/>
|
/>
|
||||||
<View ref={scrollContextRef}>
|
<View ref={scrollContextRef}>
|
||||||
{/* <ShareCardCanvas /> */}
|
{/* <ShareCardCanvas /> */}
|
||||||
{/* 综合筛选 */}
|
{/* 列表内容 */}
|
||||||
|
<View className={styles.listPage} style={{ paddingTop: totalHeight }}>
|
||||||
|
{/* 综合筛选 */}
|
||||||
{isShowFilterPopup && (
|
{isShowFilterPopup && (
|
||||||
<View>
|
<View>
|
||||||
<FilterPopup
|
<FilterPopup
|
||||||
@@ -242,8 +255,6 @@ const ListPage = () => {
|
|||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
{/* 列表内容 */}
|
|
||||||
<View className={styles.listPage} style={{ paddingTop: totalHeight }}>
|
|
||||||
<View
|
<View
|
||||||
className={`${styles.listTopSearchWrapper}`}
|
className={`${styles.listTopSearchWrapper}`}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user