智慧保安互联网APP
shuishen
2021-08-20 501e7180823c29e893d87efabd0e2b9a629bae40
pages/message/message.vue
@@ -141,7 +141,8 @@
            pagelist: 0,
            pages: 0,
            flag: true,
            pullDown: false
         };
      },
      onLoad() {
@@ -165,6 +166,28 @@
            }
         }, 1000);
      },
      onPullDownRefresh: function() {
         var that = this;
         this.pullDown = true;
         this.pagelist = 0;
         this.pages = 0;
         this.flag = true;
         this.dataList = [];
         this.newsList = [];
         this.status = 'loading';
         this.keyValue = '';
         setTimeout(() => {
            if (that.current == 0) {
               that.getReceive();
            } else {
               that.getSend();
            }
         }, 1000)
      },
      mounted() {
         this.getReceive();
      },
@@ -193,6 +216,11 @@
                  that.pages = res.data.data.pages;
                  var resdata = res.data.data.records;
                  if (this.pullDown == true) {
                     this.pullDown = false;
                     uni.stopPullDownRefresh();
                  }
                  if (resdata.length == 0) {
                     that.flag = false
@@ -239,6 +267,11 @@
                  var resdata = res.data.data.records;
                  if (this.pullDown == true) {
                     this.pullDown = false;
                     uni.stopPullDownRefresh();
                  }
                  if (resdata.length == 0) {
                     that.flag = false
                     that.status = 'nomore';
@@ -263,9 +296,9 @@
            var reg1 = /<\/?p[^>]*>/g;
            item.content = item.content.replace(reg1, '');
            var reg2 = /[&nbsp;]/g;
            item.content = item.content.replace(reg2, '');
            console.log(item)