index.json里
{
“enablePullDownRefresh”: true ,
“onReachBottomDistance”: 50
}
index.js里
onPullDownRefresh () {
var that =this;
//显示loading图标
wx.showNavigationBarLoading();
var loaded = new Promise(function(resolve,reject){
that.onLoad()
resolve();
})
loaded.then(function(){
wx.stopPullDownRefresh()
//隐藏loading图标
wx.hideNavigationBarLoading();
}).catch(function(err){
console.log(err)
})
}