From b1188a1a4eb11546f3b4558a5d657e7474a5fd2d Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期五, 30 八月 2024 14:47:52 +0800
Subject: [PATCH] 定时定量开阀相关功能

---
 pages/home/home.js |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/pages/home/home.js b/pages/home/home.js
index d0a7f0b..bf07a07 100644
--- a/pages/home/home.js
+++ b/pages/home/home.js
@@ -229,11 +229,20 @@
       // 鍔犺浇瀹屾垚鍚庨殣钘忓姞杞藉姩鐢�
       wx.hideLoading();
       this.getOpenList();
-      wx.showToast({
-        title: '鍏抽榾鎴愬姛',
-        icon: 'success',
-        duration: 3000
-      })
+      if(response.content.data.success){
+        wx.showToast({
+          title: '鍏抽榾鎴愬姛',
+          icon: 'success',
+          duration: 3000
+        })
+      }else{
+        wx.showToast({
+          title: '鍏抽榾澶辫触',
+          icon: 'error',
+          duration: 3000
+        })
+      }
+   
     }).catch(error => {
       wx.hideLoading();
       this.setData({
@@ -243,7 +252,6 @@
       })
       // 澶勭悊閿欒鍝嶅簲
       console.error('璇锋眰澶辫触:', error);
-
     });
   },
   /**

--
Gitblit v1.8.0