带参数的小程序下拉刷新页面

在JSON页面中添加:

"enablePullDownRefresh": true
 
在JS页面中:(以下是带参数的,不带参的更简单)
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function() {
    wx.showLoading({
      title: '加载中...',
    })
    let p = getCurrentPages().pop().options
    this.onLoad(p)
    setTimeout(function() {
      wx.hideLoading()
      wx.stopPullDownRefresh()
    }, 2000)
  },

页面跳转方式的采用的是重载:

https://blog.csdn.net/gftoso/article/details/97809319

页面有一个从右滑入的动画,不太协调.

 
 
原文地址:https://www.cnblogs.com/rovedog/p/12864104.html