From 04b4bddaac0a222760113899568d20b45af701f4 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 27 九月 2024 19:04:14 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 wechat_staff/pages/kefu/select.js |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/wechat_staff/pages/kefu/select.js b/wechat_staff/pages/kefu/select.js
index f73eda1..9877240 100644
--- a/wechat_staff/pages/kefu/select.js
+++ b/wechat_staff/pages/kefu/select.js
@@ -41,8 +41,12 @@
       customer
     } = this.data
     const enjoyList = wx.getStorageSync('enjoyList') || []
-    if (!customer.userId) return wx.showToast({
+    if (!customer.platSourceId) return wx.showToast({
       title: '璇峰厛閫夋嫨瑕佸叧鑱旂殑瀹㈡埛',
+      icon: 'none'
+    })
+    if(enjoyList.filter(i => i.checked).length == 0) return wx.showToast({
+      title: '璇烽噸鏂伴�夋嫨瑕佸叧鑱旂殑鐨勪骇鍝�',
       icon: 'none'
     })
     batchAddLike({
@@ -58,21 +62,22 @@
             icon: 'none'
           })
         }, 500)
+        const temp = enjoyList.filter(i => !i.checked)
+        wx.setStorageSync('enjoyList', temp)
+        this.setData({
+          customer: {},
+          total: 0,
+          dataList: [],
+          page: 1
+        })
+        wx.navigateBack()
+        this.getList()
       }else{
         return wx.showToast({
           title: res.message,
           icon: 'none'
         })
       }
-      this.setData({
-        customer: {}
-      })
-      this.setData({
-        total: 0,
-        dataList: [],
-        page: 1
-      })
-      this.getList()
     })
   },
   tabsClick(e) {

--
Gitblit v1.9.3