微信小程序列表下拉加载更多列

data = {

  //是否显示底部loading

  showingLoading : false, 

  //防止重复加载

  preventRepeatReuqueat : false

  //是否是最后一页

  isLastPage : false,

  //当前页码 

  pageNum :1

}

onReachBottom () {

  let this = that;

  that.showingLoading = true;

  //判断是否刷新到最后一页

  if ( !that.isLastPage ) {

    if ( that.preventRepeatReuqueat) {

      return true;

    }

     that.preventRepeatReuqueat = true;

    that.pageNum++;

    //获取列表数据的方法

    that.preventRepeatReuqueat = false;

  } else {

    that.showingLoading = false;

  }

}

原文地址:https://www.cnblogs.com/yinxiaohua/p/9441146.html