liyongli преди 1 година
родител
ревизия
8d9a57a578
променени са 4 файла, в които са добавени 9 реда и са изтрити 6 реда
  1. 1 2
      pages/livePhone/index.js
  2. 1 1
      pages/liveVideo/index.js
  3. 6 2
      pages/news/index.js
  4. 1 1
      pages/news/index.json

+ 1 - 2
pages/livePhone/index.js

@@ -68,7 +68,7 @@ Page({
       size,
       id
     }).then(res => {
-      this.page += 1;
+      res.records && res.records.length && (this.page += 1);
       this.total = res.total;
       const list = [
         ...this.data.images,
@@ -136,7 +136,6 @@ Page({
    * 页面上拉触底事件的处理函数
    */
   onReachBottom() {
-    if (this.total <= this.data.images.length) return
     this.getPhone(this.data.actMeet);
   },
 

+ 1 - 1
pages/liveVideo/index.js

@@ -53,7 +53,7 @@ Page({
       size,
       id
     }).then(r => {
-      this.page += 1;
+      r.records && r.records.length && (this.page += 1);
       this.total = r.total;
       const list = [
         ...this.data.videos,

+ 6 - 2
pages/news/index.js

@@ -24,9 +24,13 @@ Page({
       size,
       category
     }).then(r => {
-      this.page += 1;
+      r.records && r.records.length && (this.page += 1);
+      const list = [
+        ...this.data.news,
+        ...(r.records || [])
+      ]
       this.setData({
-        news: r.records || []
+        news: list
       })
     })
   },

+ 1 - 1
pages/news/index.json

@@ -1,4 +1,4 @@
 {
-  "navigationBarTitleText": "资讯论坛",
+  "navigationBarTitleText": "资讯",
   "usingComponents": {}
 }