- 对应的 json 文件 增加如下内容
"enablePullDownRefresh": true, "onReachBottomDistance": 50, "backgroundTextStyle": "dark", "backgroundColor": "#6197FB"
2.对应的js增加 函数onPullDownRefresh() 和 onload 是一个级别
onPullDownRefresh() {
console.log("onPullDownRefresh");
wx.showNavigationBarLoading()
this.onLoad(null);
setTimeout(function () {
getToast(1,'刷新成功')
wx.hideNavigationBarLoading()
wx.stopPullDownRefresh()
}, 1000)
}
里面放入刷新页面数据函数 我这里直接调用了 onload函数
浙公网安备 33010602011771号