liuyg
2021-11-03 56ad423dfcce6ef06b91a42d650f04d48b0a5160
pages/article/article.vue
@@ -70,7 +70,7 @@
            // pathUrl:"http://localhost:89/",
            pathUrl: this.$store.state.piAPI + "",
            page: 1,
            pagesize: 10,
            pagesize: 99999,
            status: 'loadmore',
            // loadStatus:'loading',  //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
            isLoadMore: false, //是否加载中
@@ -184,11 +184,12 @@
      //上拉加载更多
      onReachBottom() {
         console.log(2323232)
         if (this.status == 'nomore') return;
         this.page = ++this.page;
         setTimeout(() => {
            this.getArtcilePageList(this.tabInfo);
         }, 1000);
         }, 100);
      },
      methods: {
         goTabDetail(index) {
@@ -237,24 +238,23 @@
               }
            }
            uni.request({
               url: this.$store.state.piAPI + '/article/article/pageDate',
               url: that.$store.state.piAPI + '/article/article/pageDate',
               method: 'GET',
               data: paramData,
               success: (res) => {
                  if (res.data.code == 200) {
                     if (res.data.data.records) {
                        //如果总数小于pageSize,不做其他操作
                        if (res.data.data.total < this.pagesize) {
                        if (res.data.data.total < that.pagesize) {
                           that.data = res.data.data.records;
                           that.status = 'nomore';
                        } else {
                           if (res.data.data.records.length < this.pagesize) {
                           if (res.data.data.records.length < that.pagesize) {
                              //如果数量小于分页数量,则为最后一页
                              this.status = 'nomore'
                           } else {
                              that.status = 'nomore'
                           } else {
                              //否则继续加载更多数据
                              this.status = 'loading';
                              that.status = 'loading';
                           }
                           res.data.data.records.forEach((item) => {
                              that.data.push(item);
@@ -274,7 +274,6 @@
            this.getArtcilePageList(e);
         },
         refreshing() {
            if (this.isRefreshing) {
               return;
            }
@@ -283,10 +282,6 @@
            if (!this.triggered) {
               this.triggered = true;
            }
            this.dataListP = [];
            this.dataListQZ = [];
            this.dataListTXL = [];
            this.getArtcilePageList();
         },