From a924e3906a3b77f04ac4fedcff9e76ebe0c997a2 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期三, 24 七月 2024 19:19:21 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 wechat_staff/pages/kefu/fond.js |  103 +++++++++++++++++++++++++++++++++------------------
 1 files changed, 66 insertions(+), 37 deletions(-)

diff --git a/wechat_staff/pages/kefu/fond.js b/wechat_staff/pages/kefu/fond.js
index 7219087..cb63da1 100644
--- a/wechat_staff/pages/kefu/fond.js
+++ b/wechat_staff/pages/kefu/fond.js
@@ -46,49 +46,78 @@
     console.log('enjoyList', temp);
 
   },
-  onReady() {
-
+  itemCheck(e){
+    const { enjoyList } = this.data
+    const { index, inde } = e.currentTarget.dataset
+    enjoyList[index].list[inde].check = !enjoyList[index].list[inde].check
+    this.setData({ enjoyList })
   },
+  handleDown() {
+    const {
+      info,
+      path
+    } = this.data
+    let that = this
+    getContentShareImg({
+      articleId: path + '&' + info.id,
+      type: '1',
+      // pageUrl: path,
+      imgurl: info.coverImage,
+    }).then(res => {
+      this.setData({
+        isShowPoster: true,
+        showShare: false,
+        posterUrl: res.data
+      })
 
-  /**
-   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
-   */
-  onShow() {
-
+    })
   },
+  saveCard() {
+    let that = this
+    const posterUrl = this.data.posterUrl
+    wx.downloadFile({
+      url: posterUrl,
+      success: function (res) {
+        console.log('涓嬭浇鎴愬姛', res);
+        wx.saveImageToPhotosAlbum({
+          filePath: res.tempFilePath,
+          success(result) {
+            console.log(result)
+            that.setData({
+              isShowPoster: false
+            })
+            wx.showToast({
+              title: '淇濆瓨鎴愬姛',
+              icon: 'success',
+              duration: 2000
+            })
+          }
+        })
 
-  /**
-   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌
-   */
-  onHide() {
-
+      }
+    })
   },
-
-  /**
-   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇
-   */
-  onUnload() {
-
+  batchDown() {
+    setTimeout(() => {
+      eventBus.emit('batchDown', [1,2,3])
+    }, 800)
+    wx.navigateTo({
+      url: '/pages/download/index',
+    })
   },
-
-  /**
-   * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔
-   */
-  onPullDownRefresh() {
-
+  closeCard() {
+    this.setData({ isShowPoster: false })
   },
-
-  /**
-   * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
-   */
-  onReachBottom() {
-
+  openShare() {
+    console.log('鐐瑰嚮鎵撳紑');
+    this.setData({
+      showShare: true
+    })
   },
-
-  /**
-   * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
-   */
-  onShareAppMessage() {
-
-  }
+  onClose() {
+    console.log('鐐瑰嚮鍏抽棴');
+    this.setData({
+      showShare: false
+    })
+  },
 })
\ No newline at end of file

--
Gitblit v1.9.3