Liuyi
2024-10-09 16c98154ca67d48665ed3a83874d43fdc626ac60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
  const _easycom_navbar2 = common_vendor.resolveComponent("navbar");
  _easycom_navbar2();
}
const _easycom_navbar = () => "../../components/navbar/navbar.js";
if (!Math) {
  _easycom_navbar();
}
const _sfc_main = {
  __name: "index",
  setup(__props) {
    function navTo() {
      common_vendor.index.navigateTo({
        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 common_vendor.e({
        a: common_vendor.p({
          title: "送水到家"
        }),
        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
          };
        })
      });
    };
  }
};
wx.createPage(_sfc_main);