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;

  }

}

 

版权声明:本文为yinxiaohua原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/yinxiaohua/p/9441146.html