From a1664efbefb313784e1920ffc8cfceda2a2ea1c8 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期三, 07 八月 2024 14:50:03 +0800
Subject: [PATCH] 代码提交

---
 wechat_staff/pages/detailDis/product.js |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/wechat_staff/pages/detailDis/product.js b/wechat_staff/pages/detailDis/product.js
index 1d3a8c5..ca16234 100644
--- a/wechat_staff/pages/detailDis/product.js
+++ b/wechat_staff/pages/detailDis/product.js
@@ -80,10 +80,11 @@
         actionType: flag ? 'collect' : 'collect_cancel'
       }).then(res => {
         info.isCollection = flag
-        wx.showToast({title: flag ? '鏀惰棌鎴愬姛' : '鍙栨秷鏀惰棌'})
+        wx.showToast({title: flag ? '鏀惰棌鎴愬姛' : '鍙栨秷鏀惰棌', icon: 'none'})
         this.setData({
           info
         })
+        wx.setStorageSync('conentCountTemp', this.data.info)
       })
     }
   },
@@ -118,13 +119,15 @@
     getProductInfo({
       id
     }).then(res => {
-      const index = enjoyList.findIndex( i => i.id === res.data.id )
+      const index = enjoyList.findIndex( i =>(res.data && i.id === res.data.id) )
       this.setData({
         info: {
           ...res.data,
           isEnjoy: index > -1
         }
       })
+      const { info} = this.data
+      wx.setStorageSync('conentCountTemp', info)   
       wx.setNavigationBarTitle({
         title: res.data.title
       })
@@ -177,12 +180,7 @@
   //     title: productDetail.title,
   //     path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0'
   //   }
-  // },
-  onClose() {
-    this.setData({
-      showShare: false
-    })
-  },
+  // }, 
   handleDown() {
     let {
       info

--
Gitblit v1.9.3