Browse Source

修复售空商品上拉加载更多时页码递增错误的问题

pull/11/head
徐飞洋 2 months ago
parent
commit
be644d4fa5
  1. 5
      pages/index/index.js

5
pages/index/index.js

@ -774,7 +774,9 @@ Page({
loadingMore: false,
isLoading: false,
isRefreshing: false,
page: this.data.page + 1,
// 根据当前是否在查询售空商品来更新对应的页码
page: this.data.isQueryingSoldOut ? this.data.page : this.data.page + 1,
soldOutPage: this.data.isQueryingSoldOut ? this.data.soldOutPage + 1 : this.data.soldOutPage,
lastDataTimestamp: new Date().getTime()
})
@ -1123,7 +1125,6 @@ Page({
this.setData({
hasMoreData: soldOutHasMore,
isQueryingSoldOut: soldOutHasMore,
soldOutPage: soldOutPageNum + 1,
categoryQueryCache: updatedCache,
lastDataTimestamp: new Date().getTime(),
goodsCache: updatedCache[cacheKey]

Loading…
Cancel
Save