Commit f08c2aa6 by chenwq

触底修复bug

1 parent dfde959a
......@@ -362,7 +362,8 @@ Component({
})
this.setData({
list: list,
totalPages: res.pages
totalPages: res.pages,
['pageObj.currentPage']: this.data.pageObj.currentPage + 1
})
}).finally(function () {
_this.setData({
......@@ -371,12 +372,9 @@ Component({
})
},
onReachBottom() {
if (this.data.totalPages != -1 && this.data.pageObj.currentPage == this.data.totalPages) {
if (this.data.totalPages != -1 && this.data.pageObj.currentPage == (this.data.totalPages + 1)) {
return true
}
this.setData({
['pageObj.currentPage']: this.data.pageObj.currentPage + 1
})
this.getClientApi()
},
handleJumpIdx() {
......
......@@ -53,7 +53,7 @@
<view class="btn-share" catchtap="handleShare" data-idx="{{index}}">去分享</view>
</view>
</view>
<view wx:if="{{totalPages != -1 && pageObj.currentPage == totalPages}}" class="end-txt">
<view wx:if="{{totalPages != -1 && pageObj.currentPage == (totalPages + 1)}}" class="end-txt">
到底啦!
</view>
</view>
......
......@@ -75,7 +75,7 @@ Page({
// 重新刷新
// let { detail } = e || null
// console.log(detail)
console.log(e)
// console.log(e)
if (e) {
this.setUserInfo()
let clientModule = this.selectComponent('#client')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!