From 2faa6546a9f9ddb29f81cbc9770fc25b95703695 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 26 七月 2024 17:02:39 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 wechat_staff/components/disProduct/index.js |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/wechat_staff/components/disProduct/index.js b/wechat_staff/components/disProduct/index.js
index cc33cd8..3849c24 100644
--- a/wechat_staff/components/disProduct/index.js
+++ b/wechat_staff/components/disProduct/index.js
@@ -6,10 +6,6 @@
   properties: {
     menuButtonInfo: Object
   },
-
-  /**
-   * 缁勪欢鐨勫垵濮嬫暟鎹�
-   */
   data: {
     activeIndex: -1,
     activeParam: [],
@@ -118,8 +114,6 @@
       const paramIndex = e.currentTarget.dataset.index
       const { secondCateList, tagCodes, activeParam, activeIndex } = this.data
       const index = tagCodes.indexOf(code)
-      console.log('code', code);
-      console.log('tagCodes', tagCodes);
       if(index === -1){
         // 鍚宲aram閲宑ode閲嶅
         if(activeParam && activeParam.length > 0){
@@ -138,13 +132,13 @@
         secondCateList[activeIndex].paramIndex = -1
         secondCateList[activeIndex].paramName = ''
       }
-      this.setData({ pageNum: 1,datalist: [],total: 0})
       this.setData({ tagCodes, secondCateList })
     },
     changeShowParams(e){
       const { secondCateList } = this.data
       const activeIndex = e.currentTarget.dataset.index
       console.log('activeIndex', activeIndex);
+      console.log('activeIndex', this.data.activeIndex);
       console.log('secondCateList', secondCateList);
       if(activeIndex === this.data.activeIndex){
         this.setData({ activeIndex: -1, activeParam: [] })
@@ -161,13 +155,13 @@
       const { secondCateList } = this.data
       secondCateList.forEach(item => {
         item.paramIndex = -1
-        item.paramName = ''
+        item.paramName = item.paramName || ''
       })
       this.setData({ tagCodes: [],activeParam: [],secondCateList,activeIndex: -1 })
     },
     subParam() {
       this.setData({ activeParam: [] })
-      this.setData({ pageNum: 1,datalist: [],total: 0})
+      this.setData({ pageNum: 1,activeIndex: -1, datalist: [],total: 0})
       this.getList()
     },
   }

--
Gitblit v1.9.3