zs 2 роки тому
батько
коміт
6cdcc38358
1 змінених файлів з 2 додано та 2 видалено
  1. 2 2
      pages/school/info.js

+ 2 - 2
pages/school/info.js

@@ -43,7 +43,7 @@ Page({
         let data = e.detail;
         let data = e.detail;
         that.setData({ 'tabs.active': data.active })
         that.setData({ 'tabs.active': data.active })
     },
     },
-    
+
     // 图片预览
     // 图片预览
     imgView: function (e) {
     imgView: function (e) {
         const that = this;
         const that = this;
@@ -90,7 +90,7 @@ Page({
         const that = this;
         const that = this;
         let list = that.data.list;
         let list = that.data.list;
         let limit = that.data.limit;
         let limit = that.data.limit;
-        if (that.data.total > list.length) {
+        if (that.data.total > list && list.length) {
             wx.showLoading({ title: '加载中', mask: true })
             wx.showLoading({ title: '加载中', mask: true })
             let page = that.data.page + 1;
             let page = that.data.page + 1;
             that.setData({ page: page })
             that.setData({ page: page })