From ba4da8d8e8d55153d0ff1c39ebdac30115a066a8 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 09 八月 2024 09:23:08 +0800
Subject: [PATCH] aa

---
 wechat_staff/pages/kefu/select.js |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/wechat_staff/pages/kefu/select.js b/wechat_staff/pages/kefu/select.js
index 7bd8777..8606fa8 100644
--- a/wechat_staff/pages/kefu/select.js
+++ b/wechat_staff/pages/kefu/select.js
@@ -41,7 +41,7 @@
       customer
     } = this.data
     const enjoyList = wx.getStorageSync('enjoyList') || []
-    if (!customer.userId) return wx.showToast({
+    if (!customer.customerId) return wx.showToast({
       title: '璇峰厛閫夋嫨瑕佸叧鑱旂殑瀹㈡埛',
       icon: 'none'
     })
@@ -51,11 +51,19 @@
       platId: customer.platSourceId,
       platSource: customer.platSource
     }).then(res => {
-      setTimeout(() => {
-        wx.showToast({
-          title: '缁戝畾鎴愬姛',icon: 'none'
+      if (res.code == 200) {
+        setTimeout(() => {
+          wx.showToast({
+            title: '缁戝畾鎴愬姛',
+            icon: 'none'
+          })
+        }, 500)
+      }else{
+        return wx.showToast({
+          title: res.message,
+          icon: 'none'
         })
-      }, 500)
+      }
       this.setData({
         customer: {}
       })

--
Gitblit v1.9.3