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

---
 wechat_staff/pages/kefu/fond.js |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 51 insertions(+), 2 deletions(-)

diff --git a/wechat_staff/pages/kefu/fond.js b/wechat_staff/pages/kefu/fond.js
index bedb67d..b9ef121 100644
--- a/wechat_staff/pages/kefu/fond.js
+++ b/wechat_staff/pages/kefu/fond.js
@@ -24,6 +24,7 @@
       item.checked = false
     })
     wx.setStorageSync('enjoyList', enjoyList)
+    console.log(this.data.enjoyList)
     this.initData()
   },
 
@@ -65,11 +66,56 @@
       }
     })
     wx.setStorageSync('enjoyList', enjoyList)
+   
     this.initData()
   },
+  itemClick(e) {
+    let map = [
+      '/pages/detailDis/product',
+      '/pages/detailDis/case',
+      '/pages/detailDis/realpic',
+      '/pages/consult/detail',
+    ]
+    const { id, type } = e.currentTarget.dataset
+    wx.navigateTo({
+      url: map[type] + '?id=' + id,
+    })
+  },
   bind() {
+    const enjoyList = wx.getStorageSync('enjoyList') || []
+    const temp = enjoyList.filter(i => i.checked)
+    if(temp.length == 0) return wx.showToast({
+      title: '璇峰厛閫夋嫨瑕佸叧鑱旂殑鍟嗗搧',icon:'none'
+    })
     wx.navigateTo({
       url: '/pages/kefu/select',
+    })
+  },
+  handleShare() {
+    const { enjoyList } = this.data
+    let info = {}
+    enjoyList.forEach(item => {
+      item.list.forEach(ite => {
+        if(ite.checked){
+          info = ite
+        }
+      })
+    })
+
+    let map = [
+      '/pages/detailDis/product',
+      '/pages/detailDis/case',
+      '/pages/detailDis/realpic'
+    ] 
+    console.log(info.id)
+    wx.navigateToMiniProgram({
+      appId: 'wx208dd1edc0be24ee',
+      path: map[info.joinType],
+      envVersion: 'trial',
+      extraData: {
+        id: info.id,
+        origin: 'b'
+      }
     })
   },
   handleDown() {
@@ -86,7 +132,7 @@
     let that = this
     getContentShareImg({
       articleId: obj.id + '&' + obj.joinType,
-      type: '1',
+      type: '0',
       // pageUrl: path,
       imgurl: obj.coverImage,
     }).then(res => {
@@ -161,6 +207,7 @@
             }
           })
           wx.setStorageSync('enjoyList', enjoyListTemp)
+          
           that.initData()
         }
       }
@@ -168,11 +215,13 @@
     
   },
   checkAll() {
+    this.setData({checkAll:!this.data.checkAll})
     let enjoyList = wx.getStorageSync('enjoyList') || []
     enjoyList.forEach(item => {
-      item.checked = !item.checked
+      item.checked = this.data.checkAll
     })
     wx.setStorageSync('enjoyList', enjoyList)
+    
     this.initData()
   },
   openShare() {

--
Gitblit v1.9.3