隐藏load ,提高用户体验

This commit is contained in:
张成
2025-09-29 10:35:34 +08:00
parent 090a44fd6e
commit 9b6e3e15d0
5 changed files with 36 additions and 170 deletions

View File

@@ -163,11 +163,11 @@ const ListPage = () => {
Taro.stopPullDownRefresh();
// 显示刷新成功提示
Taro.showToast({
title: "刷新成功",
icon: "success",
duration: 1000,
});
// Taro.showToast({
// title: "刷新成功",
// icon: "success",
// duration: 1000,
// });
} catch (error) {
// 刷新失败时也停止动画
Taro.stopPullDownRefresh();
@@ -207,7 +207,7 @@ const ListPage = () => {
updateFilterOptions(params);
};
const handleSearchChange = () => { };
const handleSearchChange = () => { };
// 距离筛选
const handleDistanceOrQuickChange = (name, value) => {
@@ -228,8 +228,8 @@ const ListPage = () => {
});
};
// 初始化字典数据
const initDictionaryData = async () => {
// 初始化字典数据
const initDictionaryData = async () => {
try {
const { fetchDictionary } = useDictionaryStore.getState();
await fetchDictionary();
@@ -238,9 +238,9 @@ const ListPage = () => {
}
}
useEffect(() => {
initDictionaryData()
}, []);
useEffect(() => {
initDictionaryData()
}, []);
return (
<>
@@ -255,21 +255,21 @@ const ListPage = () => {
{/* 列表内容 */}
<View className={styles.listPage} style={{ paddingTop: totalHeight }}>
{/* 综合筛选 */}
{isShowFilterPopup && (
<View>
<FilterPopup
loading={loading}
onCancel={toggleShowPopup}
onConfirm={handleFilterConfirm}
onChange={handleUpdateFilterOptions}
filterOptions={filterOptions}
onClear={clearFilterOptions}
visible={isShowFilterPopup}
onClose={toggleShowPopup}
statusNavbarHeigh={statusNavbarHeightInfo?.totalHeight}
/>
</View>
)}
{isShowFilterPopup && (
<View>
<FilterPopup
loading={loading}
onCancel={toggleShowPopup}
onConfirm={handleFilterConfirm}
onChange={handleUpdateFilterOptions}
filterOptions={filterOptions}
onClear={clearFilterOptions}
visible={isShowFilterPopup}
onClose={toggleShowPopup}
statusNavbarHeigh={statusNavbarHeightInfo?.totalHeight}
/>
</View>
)}
<View
className={`${styles.listTopSearchWrapper}`}
>