From 404ebee9f47d2d80353e64974193e3e31e7b91b6 Mon Sep 17 00:00:00 2001
From: Liuyi <candymxq888@outlook.com>
Date: 星期二, 08 十月 2024 17:38:57 +0800
Subject: [PATCH] 添加设备列表,添加待配送订单

---
 unpackage/dist/dev/mp-weixin/pages/sendWater/index.js |   45 ++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 42 insertions(+), 3 deletions(-)

diff --git a/unpackage/dist/dev/mp-weixin/pages/sendWater/index.js b/unpackage/dist/dev/mp-weixin/pages/sendWater/index.js
index 65e5311..15947bb 100644
--- a/unpackage/dist/dev/mp-weixin/pages/sendWater/index.js
+++ b/unpackage/dist/dev/mp-weixin/pages/sendWater/index.js
@@ -16,13 +16,52 @@
         url: "/pages/preSendWater/index"
       });
     }
+    const isComplete = common_vendor.ref(true);
+    const isActive = common_vendor.ref({ borderBottom: `3px solid #226AC9` });
+    function swatch(val) {
+      if (val == 1 && !isComplete.value || val == 2 && isComplete.value)
+        ;
+      else if (val == 1) {
+        isComplete.value = false;
+      } else if (val == 2) {
+        isComplete.value = true;
+      }
+    }
+    const deliverList = common_vendor.ref([
+      { count: "20", num: "132123123", addre1: "测试1", addre2: "测试2", time: "16:00-18:00" },
+      { count: "20", num: "132123123", addre1: "测试1", addre2: "测试2", time: "16:00-18:00" },
+      { count: "20", num: "132123123", addre1: "测试1", addre2: "测试2", time: "16:00-18:00" }
+    ]);
+    const completeList = common_vendor.ref([1, 2, 3]);
     return (_ctx, _cache) => {
-      return {
+      return common_vendor.e({
         a: common_vendor.p({
           title: "送水到家"
         }),
-        b: common_vendor.o(($event) => navTo())
-      };
+        b: common_vendor.o(($event) => navTo()),
+        c: common_vendor.o(($event) => swatch(1)),
+        d: common_vendor.s(!isComplete.value ? isActive.value : {}),
+        e: common_vendor.o(($event) => swatch(2)),
+        f: common_vendor.s(isComplete.value ? isActive.value : {}),
+        g: !isComplete.value
+      }, !isComplete.value ? {
+        h: common_vendor.f(deliverList.value, (item, index, i0) => {
+          return {
+            a: common_vendor.t(item.count),
+            b: common_vendor.t(item.num),
+            c: common_vendor.t(item.addre1),
+            d: common_vendor.t(item.addre2),
+            e: common_vendor.t(item.time),
+            f: index
+          };
+        })
+      } : {
+        i: common_vendor.f(completeList.value, (item, index, i0) => {
+          return {
+            a: index
+          };
+        })
+      });
     };
   }
 };

--
Gitblit v1.9.3