@@ -28,6 +28,7 @@
this.getFirstList()
},
onReachBottom: function() {
+ console.log(11, 'a')
if (isEnd) {
return
}
@@ -58,8 +59,15 @@
getList(params)
.then(res => {
- this.list = res.list
- isEnd = res.count
+
+ if (page == 1) {
+ this.list = res.list
+ } else {
+ res.list.forEach(element => {
+ this.list.push(element)
+ })
+ }
+ isEnd = this.list.length >= res.count
uni.hideLoading()
})
.catch(() => {