onReachBottom 方法不执行
wxml
<view class="search-wrap">
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>111122</view>
<view>888</view>
<view>77</view>
<view>777</view>
<view>666</view>
<view>555</view>
<view>444</view>
<view>44</view>
<view>333</view>
<view>222</view>
<view>1111</view>
</view>
js
// pages/search/search.js
Page({
/**
* 页面的初始数据
*/
data: {
keyword: "",
currentPage: 1,
totalNum: 0,
userList: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// 执行
console.log("111");
},
onShow() {
// 执行
console.log("2222");
},
onPageScroll() {
// 不执行
console.log("3333");
},
onReachBottom () {
// 不执行
console.log("44444");
},
});
json
{
"usingComponents": {},
"onReachBottomDistance":30
}
wxss
.search-wrap {
height: 100%;
background-color: #f7f7f7;
overflow: auto;
}
app.wxss
page {
height: 100%;
}
把你的样式去掉试一下
// 去掉这个就好了
"renderer": "skyline",