From ebc6e7ee67f13e7aa311e737dfcb4c5caed112ee Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 15 八月 2024 18:23:57 +0800
Subject: [PATCH] ll

---
 wechat_staff/pages/discover/discover.js |   40 +++++++++++++++++++++++++++++++---------
 1 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/wechat_staff/pages/discover/discover.js b/wechat_staff/pages/discover/discover.js
index 81d364b..662ba28 100644
--- a/wechat_staff/pages/discover/discover.js
+++ b/wechat_staff/pages/discover/discover.js
@@ -1,4 +1,6 @@
-import { getCataLogTagList, getCatalogList } from '../../api/index'
+import { getCataLogTagList, getCatalogList,refreshEnjoy } from '../../api/index'
+const { HYEventBus } = require('hy-event-store')
+const eventBus = new HYEventBus()
 Page({
 
   /**
@@ -15,7 +17,34 @@
   onLoad(options) {
     let menuButtonInfo = wx.getMenuButtonBoundingClientRect();
     this.setData({menuButtonInfo})
-  },  
+  }, 
+  
+  onShow(){
+      
+    refreshEnjoy(this) 
+    this.refreshDatacount()
+    let discoverKey = wx.getStorageSync('discoverKey') || ''
+    if(discoverKey){
+      this.setData({ catalogCode: discoverKey })
+      setTimeout(() => {
+        wx.setStorageSync('discoverKey', '')
+      }, 500)
+    } 
+  },
+  refreshDatacount(){  
+    var child =null;
+    if(this.data.catalogCode == 'product_intro'){
+      child = this.selectComponent(".disProduct")
+    }else if(this.data.catalogCode == 'whole_case'){
+      child = this.selectComponent(".disCase")
+    }else if(this.data.catalogCode == 'real_case'){
+      child = this.selectComponent(".disRealpic")
+    }   
+    // 璋冪敤瀛愮粍浠朵腑瀹氫箟鐨勬柟娉� 
+    if(child){ 
+      child.refreshCount();
+    } 
+  },
   tabsClick(e) {
     const catalogCode = e.currentTarget.dataset.code
     this.setData({catalogCode})
@@ -24,13 +53,6 @@
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
    */
   onReady() {
-
-  },
-
-  /**
-   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
-   */
-  onShow() {
 
   },
 

--
Gitblit v1.9.3