From 715a2691d88ffbe5f5be9e5403c166f923088fcc Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 26 七月 2024 17:15:57 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia

---
 wechat_staff/pages/userinfo/collect.js |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/wechat_staff/pages/userinfo/collect.js b/wechat_staff/pages/userinfo/collect.js
index 2ff7453..55c2bcd 100644
--- a/wechat_staff/pages/userinfo/collect.js
+++ b/wechat_staff/pages/userinfo/collect.js
@@ -15,7 +15,6 @@
     pageSize: 10,
   },
   onLoad(options) {
-    this.getList()
   },
   onReachBottom() {
     console.log('瑙﹀簳浜嬩欢');
@@ -66,10 +65,16 @@
       pageNum
     }).then(res => {
       if (res.data) {
-        this.setData({
-          dataList: [...this.data.dataList, ...res.data.records || []],
-          total: res.data.total
-        })
+        res.data.pageNum =  res.data.pageNum <=0?1: res.data.pageNum
+        if(pageNum == res.data.pageNum){
+          if(pageNum == 1){
+            this.setData({dataList:[],total:0})
+          }
+          this.setData({
+            dataList: [...this.data.dataList, ...res.data.records || []],
+            total: res.data.total
+          })
+        } 
       }
     })
   },
@@ -84,8 +89,9 @@
   /**
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
    */
-  onShow() {
-
+  onShow() { 
+    this.setData({pageNum:1})
+    this.getList()
   },
 
   /**

--
Gitblit v1.9.3