小程序下拉刷新

  ///js刷新
//手动下拉刷新
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
    this.setData({
      goods_list: [],
    })
    this.getindex(this.data.pages)
    wx.stopPullDownRefresh()
  },

//自动下拉刷新

 wx.startPullDownRefresh();

  onPullDownRefresh: function() {
    console.log('刷新')
    var that = this;
    that.setData({
      imgUrl: [],
    })
    // 获取头像以及昵称
    that.getindex(that.data.pages);
    wx.stopPullDownRefresh()

  },
 

猜你喜欢

转载自blog.csdn.net/qq284944970/article/details/82110998
今日推荐