From 35cd1fc2e97ee8c8ec93d632cfc6b8b90e7a6e2b Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期五, 18 十月 2024 17:18:31 +0800
Subject: [PATCH] 1.首页添加横滑删除功能2.同步最新代码

---
 pages/openCard/openCard.js |   30 ++++++++++++++++++------------
 1 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/pages/openCard/openCard.js b/pages/openCard/openCard.js
index a3f47d4..101c497 100644
--- a/pages/openCard/openCard.js
+++ b/pages/openCard/openCard.js
@@ -14,7 +14,8 @@
     vcId: "",
     activeIndex: -1,
     datetimeVisible: false,
-    datetime: new Date().getTime(),
+    dateStartTime: new Date().getTime(),
+    dateEndTime: new Date().getTime() + 24 * 60 * 60 * 1000,
     datetimeText: '',
     allCardPoints: [], // 鎵�鏈夎櫄鎷熷崱
     irrigateProfile: [], //鑾峰彇鎵�閫夌亴婧夋柟寮忕殑璇︾粏鏁版嵁
@@ -36,7 +37,8 @@
     radioValue: "0", //寮�闃�鏂瑰紡閫変腑鐨勭被鍨�
     costiomTime: "", //鑷畾涔夌亴婧夋椂闂�
     waterAmount: 0, //瀹氶噺寮�闃�鐨勬按閲�
-    costiomWater:"",//杈撳叆鐨勮嚜瀹氫箟姘撮噺
+    costiomWater: "", //杈撳叆鐨勮嚜瀹氫箟姘撮噺
+    isWXRefreshing:false,
   },
   openValva(event) {
     const {
@@ -51,7 +53,7 @@
       // 閫夋嫨铏氭嫙鍗″悗
       this.initDialogData();
       this.setData({
-        vcId: item.vcId,
+        vcId: item.id,
       })
     }
   },
@@ -103,7 +105,10 @@
    * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔
    */
   onPullDownRefresh() {
-
+    this.setData({
+      isWXRefreshing: true
+    });
+    this.getCardList();
   },
 
   /**
@@ -163,7 +168,8 @@
     });
     // 鏇存柊鍒楄〃鏁版嵁
     this.setData({
-      allCardPoints: updatedList
+      allCardPoints: updatedList,
+      isWXRefreshing:false
     });
   },
   handleClost() {
@@ -198,7 +204,7 @@
       this.data.waterAmount = parseInt(this.data.irrigateProfile[index].defaultValue)
       this.setData({
         activeIndex: parseInt(index),
-        costiomWater:""
+        costiomWater: ""
       });
     }
   },
@@ -431,11 +437,11 @@
     const data = {
       intakeId: this.data.intakeId, //鍙栨按鍙D
       vcId: this.data.vcId, //铏氭嫙鍗D
-      minutes: this.data.waterAmount, //姘撮噺
+      waterAmount: this.data.waterAmount, //姘撮噺
       operator: app.globalData.sessionId //鎿嶄綔鍛�
     };
     post({
-      url: "/wx/valve/quantify_close",
+      url: "wx/valve/quantify_close",
       data: data
     }).then(response => {
       // 澶勭悊鎴愬姛鍝嶅簲
@@ -472,7 +478,7 @@
       plannedOpenTime: this.data.openTime
     };
     post({
-      url: "/wx/valve/planed_open_quantify_close",
+      url: "wx/valve/planed_open_quantify_close",
       data: data
     }).then(response => {
       // 澶勭悊鎴愬姛鍝嶅簲
@@ -583,7 +589,7 @@
     }
   },
   //杈撳叆鑷畾涔夋按閲忕殑鐩戝惉
-  onWaterInputChange(data){
+  onWaterInputChange(data) {
     console.log(data.detail.value)
     if (data.detail.value !== "") {
       this.setData({
@@ -597,7 +603,7 @@
     }
   },
   // 瀹氶噺寮�娉垫寜閽�
-  btnOpenOnWater(){
+  btnOpenOnWater() {
     if (this.data.waterAmount > 0) {
       if (this.data.isOpenTiming) {
         this.quantifyOpenTime();
@@ -610,7 +616,7 @@
         title: '璇烽�夋嫨鎴栬緭鍏ョ亴婧夋椂闂达紒',
       })
     }
-  }
+  },
 
 
 })
\ No newline at end of file

--
Gitblit v1.8.0