Commit f08c2aa6 by chenwq

触底修复bug

1 parent dfde959a
...@@ -362,7 +362,8 @@ Component({ ...@@ -362,7 +362,8 @@ Component({
}) })
this.setData({ this.setData({
list: list, list: list,
totalPages: res.pages totalPages: res.pages,
['pageObj.currentPage']: this.data.pageObj.currentPage + 1
}) })
}).finally(function () { }).finally(function () {
_this.setData({ _this.setData({
...@@ -371,12 +372,9 @@ Component({ ...@@ -371,12 +372,9 @@ Component({
}) })
}, },
onReachBottom() { 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 return true
} }
this.setData({
['pageObj.currentPage']: this.data.pageObj.currentPage + 1
})
this.getClientApi() this.getClientApi()
}, },
handleJumpIdx() { handleJumpIdx() {
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<view class="btn-share" catchtap="handleShare" data-idx="{{index}}">去分享</view> <view class="btn-share" catchtap="handleShare" data-idx="{{index}}">去分享</view>
</view> </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>
</view> </view>
......
...@@ -75,7 +75,7 @@ Page({ ...@@ -75,7 +75,7 @@ Page({
// 重新刷新 // 重新刷新
// let { detail } = e || null // let { detail } = e || null
// console.log(detail) // console.log(detail)
console.log(e) // console.log(e)
if (e) { if (e) {
this.setUserInfo() this.setUserInfo()
let clientModule = this.selectComponent('#client') 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!