一、在app.json中启动刷新,

在Windows 中,

       添加  "enablePullDownRefresh":"true"

二、在需要刷新的页面中写(若是单个页面),反之,可写入app.js中:

      

 

onPullDownRefresh: function () {
wx.showNavigationBarLoading() //在标题栏中显示加载
setTimeout(function () {
// complete
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新
}, 1500);
},

 

结语:此列是模拟下拉刷新页面。若需要实时下拉刷新数据,需获取动态数据。