From 3ac33e0ea28357bac078ac93404ac02ad9a61738 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 23 七月 2024 18:01:06 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 wechat_staff/pages/kefu/index.js |   38 ++++++++++++++++++++++++++++++++------
 1 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/wechat_staff/pages/kefu/index.js b/wechat_staff/pages/kefu/index.js
index f5f894b..8034eec 100644
--- a/wechat_staff/pages/kefu/index.js
+++ b/wechat_staff/pages/kefu/index.js
@@ -1,11 +1,12 @@
-// pages/kefu/index.js
+import { getCustomizedNewsDetail } from '../../api/index'
 Page({
 
   /**
    * 椤甸潰鐨勫垵濮嬫暟鎹�
    */
   data: {
-    bottomLift: 0
+    bottomLift: 0,
+    info: {}
   },
 
   /**
@@ -16,11 +17,36 @@
     this.setData({
       bottomLift: app.bottomLift
     })
+    if(options && options.id){
+      this.getDetail(options.id)
+    }
   },
-
-  /**
-   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
-   */
+  getDetail(id) {
+    getCustomizedNewsDetail({id}).then(res => {
+      this.setData({
+        info: { ...res.data }
+      })
+    })
+  },
+  toSever () {
+    console.log('瀹㈡湇');
+    try {
+      wx.openCustomerServiceChat({
+        extInfo: {
+          url: "https://work.weixin.qq.com/kfid/kfcfbccadc81cd01c0b?enc_scene=ENC5EhZgjepB9zsutZUQ5AiRnyN7GamomkuWsUA4bwigukSK6w5pVyRzcNDKurjFDNDC7" //瀹㈡湇ID
+        },
+        corpId: 'ww3686d2bb864ce3e2', //浼佷笟寰俊ID
+        success(res) {
+          console.log('杩炴帴瀹㈡湇鎴愬姛');
+        }
+      })
+    } catch (error) {
+      wx.showToast({
+        title: '璇锋洿鏂拌嚦寰俊鏈�鏂扮増鏈�',
+        icon: 'none'
+      })
+    }
+  },
   onReady() {
 
   },

--
Gitblit v1.9.3