From 4eaf6d8835d4e9b204f13d012f13bbd8a94a21cc Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期日, 21 七月 2024 22:52:37 +0800
Subject: [PATCH] lll

---
 wechat_jiaxuan/components/disProduct/index.js |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/wechat_jiaxuan/components/disProduct/index.js b/wechat_jiaxuan/components/disProduct/index.js
index e932f66..6fd1dbd 100644
--- a/wechat_jiaxuan/components/disProduct/index.js
+++ b/wechat_jiaxuan/components/disProduct/index.js
@@ -1,9 +1,10 @@
-import { getCatalogList, getZhongTaiProductPage } from '../../api/index'
+import { getCatalogList,getCataLogTagList, getZhongTaiProductPage } from '../../api/index'
 Component({
   /**
    * 缁勪欢鐨勫睘鎬у垪琛�
    */
   properties: {
+    menuButtonInfo: Object
   },
 
   /**
@@ -17,6 +18,7 @@
     datalist: [],
     pageNum: 1,
     pageSize: 10,
+    total: 0,
     query: '',
     sortType: 'NORMAL',
     catalogCode: ""
@@ -52,7 +54,7 @@
     },
     getTag() {
       const catalogCode = this.data.catalogCode
-      getCatalogList({
+      getCataLogTagList({
         catalogCode
       })
     },
@@ -70,14 +72,30 @@
         })
       })
     },
+    scrolltolower() {
+      console.log('瑙﹀簳浜嬩欢');
+      const { total, datalist, pageNum } = this.data
+      if(total > datalist.length){
+        this.setData({ pageNum: pageNum + 1 })
+        this.getList()
+      }else{
+        wx.showToast({
+          title: '鏆傛棤鏇村鏁版嵁',
+          icon: 'none'
+        })
+      }
+    },
     cateClick(e) {
       const catalogCode = e.currentTarget.dataset.code
       this.setData({ catalogCode })
+      this.setData({ pageNum: 1,datalist: [],total: 0})
+      this.getTag()
       this.getList()
     },
     statusChange(e) {
       const sortType = e.currentTarget.dataset.status
       this.setData({sortType})
+      this.setData({ pageNum: 1,datalist: [],total: 0})
       this.getList()
     },
     handleDetail(e) {

--
Gitblit v1.9.3