小程序分页显示有两种实现方式:
第一种:使用小程序的scroll-view 视图容器
第二种:使用微信官方提供的分页加载方法
本文介绍第二种实现方式,第一种实现方法与第二种类似。
后端采用Mybatis分页插件。
由于对数据进行了优化,加载速度过快,正在载入更多… 一闪而过,注意看可以看到的
app.json
"window": {
"onReachBottomDistance": 200
},
test.js
listData: [],
pages: 0,
pageSize:15,
pageNum:1,
nonedata:false,
moredata:false
finddetails(){
var that= this;
wx.request({
url: app.globalData.httpurl + 'inter/getDetailPageyh',
method