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 { useDictionaryActions } from "@/store/dictionaryStore";
|
||||
import { View } from "@tarojs/components";
|
||||
import { View, ScrollView } from "@tarojs/components";
|
||||
|
||||
const FilterPopup = (props: FilterPopupProps) => {
|
||||
const {
|
||||
@@ -91,11 +91,25 @@ const FilterPopup = (props: FilterPopupProps) => {
|
||||
round
|
||||
visible={visible}
|
||||
onClose={onClose}
|
||||
style={{ marginTop: statusNavbarHeigh + "px", maxHeight: '75vh' }}
|
||||
style={{ marginTop: statusNavbarHeigh + "px", maxHeight: '70vh' }}
|
||||
overlayStyle={{ marginTop: statusNavbarHeigh + "px" }}
|
||||
zIndex={1001}
|
||||
>
|
||||
<div className={styles.filterPopupWrapper}>
|
||||
<View className={styles.filterPopupWrapper}>
|
||||
{/* 可滚动的内容区域 */}
|
||||
<ScrollView
|
||||
scrollY
|
||||
enhanced
|
||||
showScrollbar={false}
|
||||
className={styles.filterPopupContent}
|
||||
style={{
|
||||
maxHeight: '60vh'
|
||||
}}
|
||||
onTouchMove={(e) => {
|
||||
// 阻止滚动穿透
|
||||
e.stopPropagation();
|
||||
}}
|
||||
>
|
||||
{/* 日历 */}
|
||||
<View>
|
||||
<CalendarUI
|
||||
@@ -159,8 +173,10 @@ const FilterPopup = (props: FilterPopupProps) => {
|
||||
options={gamePlayOptions}
|
||||
value={filterOptions?.playType}
|
||||
/>
|
||||
{/* 按钮 */}
|
||||
<div className={styles.filterPopupBtnWrapper}>
|
||||
</ScrollView>
|
||||
|
||||
{/* 固定在底部的按钮区域 */}
|
||||
<View className={styles.filterPopupBtnWrapper}>
|
||||
<Button
|
||||
className={styles.btn}
|
||||
type="default"
|
||||
@@ -176,8 +192,8 @@ const FilterPopup = (props: FilterPopupProps) => {
|
||||
>
|
||||
显示 {gamesNum} 场球局
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</View>
|
||||
</View>
|
||||
</Popup>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -36,7 +36,7 @@ const ListPage = () => {
|
||||
initialFilterSearch,
|
||||
loadMoreMatches,
|
||||
fetchGetGamesCount,
|
||||
updateDistanceQuickFilter
|
||||
updateDistanceQuickFilter,
|
||||
} = store;
|
||||
|
||||
const {
|
||||
@@ -47,6 +47,7 @@ const ListPage = () => {
|
||||
filterOptions,
|
||||
distanceQuickFilter,
|
||||
isShowInputCustomerNavBar,
|
||||
pageOption
|
||||
} = listPageState || {};
|
||||
|
||||
// 防抖的滚动处理函数
|
||||
@@ -90,6 +91,16 @@ const ListPage = () => {
|
||||
getLocation()
|
||||
}, []);
|
||||
|
||||
// 监听数据变化,如果是第一页就滚动到顶部
|
||||
useEffect(() => {
|
||||
if (pageOption?.page === 1 && matches?.length > 0) {
|
||||
Taro.pageScrollTo({
|
||||
scrollTop: 0,
|
||||
duration: 300
|
||||
});
|
||||
}
|
||||
}, [matches, pageOption?.page]);
|
||||
|
||||
// 清理定时器
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
@@ -226,6 +237,8 @@ const ListPage = () => {
|
||||
/>
|
||||
<View ref={scrollContextRef}>
|
||||
{/* <ShareCardCanvas /> */}
|
||||
{/* 列表内容 */}
|
||||
<View className={styles.listPage} style={{ paddingTop: totalHeight }}>
|
||||
{/* 综合筛选 */}
|
||||
{isShowFilterPopup && (
|
||||
<View>
|
||||
@@ -242,8 +255,6 @@ const ListPage = () => {
|
||||
/>
|
||||
</View>
|
||||
)}
|
||||
{/* 列表内容 */}
|
||||
<View className={styles.listPage} style={{ paddingTop: totalHeight }}>
|
||||
<View
|
||||
className={`${styles.listTopSearchWrapper}`}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user