Browse Source

完善筛选逻辑,修复loadGoods函数中的骨架屏显示逻辑

pull/4/head
徐飞洋 2 months ago
parent
commit
89d1361ab6
  1. 5
      pages/index/index.js

5
pages/index/index.js

@ -895,9 +895,10 @@ Page({
return;
}
// 筛选时不显示骨架屏
if (isLoadMore) {
this.setData({ loadingMore: true })
} else {
} else if (!forceRefresh) { // 只有非筛选的首次加载才显示骨架屏
this.setData({ isLoading: true })
}
@ -1424,7 +1425,7 @@ Page({
goods: [],
filteredGoods: [],
isLoading: false, // 筛选时不显示骨架屏
isRefreshing: true, // 添加下拉刷新状态
isRefreshing: false, // 筛选时不显示下拉刷新状态
// 清除所有缓存以获取最新数据
categoryQueryCache: {},
lastDataTimestamp: 0,

Loading…
Cancel
Save