WXL
21 小时以前 05c363fdd7ab04e3bd9a753e2c5d5bfff04d681c
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
  __name: "detail",
  setup(__props) {
    const vaccine = common_vendor.ref({
      id: 1,
      nameKey: "vaccine.list.covid.name",
      fullDescKey: "vaccine.list.covid.fullDesc",
      suitableKey: "vaccine.list.covid.suitable",
      noticeKey: "vaccine.list.covid.notice",
      image: "/static/vaccine/covid.jpg",
      price: 0,
      recommended: true
    });
    const clinics = common_vendor.ref([
      {
        id: 1,
        name: "青岛镜湖医院预防接种门诊",
        address: "青岛连胜马路33号",
        image: "/static/hospital/kiang-wu.jpg",
        tags: ["全天候接种", "可预约", "免费停车"]
      },
      {
        id: 2,
        name: "青岛科大医院疫苗中心",
        address: "青岛氹仔大学大马路",
        image: "/static/hospital/must.jpg",
        tags: ["专业团队", "环境舒适", "交通便利"]
      }
    ]);
    const selectClinic = (clinic) => {
      common_vendor.index.navigateTo({
        url: `/pages/vaccine/book?id=${vaccine.value.id}&clinicId=${clinic.id}`
      });
    };
    const bookVaccine = () => {
      common_vendor.index.navigateTo({
        url: `/pages/vaccine/book?id=${vaccine.value.id}`
      });
    };
    common_vendor.onMounted(() => {
      var _a, _b;
      const pages = getCurrentPages();
      const page = pages[pages.length - 1];
      const vaccineId = (_b = (_a = page.$page) == null ? void 0 : _a.options) == null ? void 0 : _b.id;
      loadVaccineDetail(vaccineId);
    });
    const loadVaccineDetail = (id) => {
      common_vendor.index.__f__("log", "at pages/vaccine/detail.vue:128", "加载疫苗详情:", id);
    };
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: vaccine.value.image,
        b: common_vendor.t(_ctx.$t(vaccine.value.nameKey)),
        c: vaccine.value.price === 0
      }, vaccine.value.price === 0 ? {
        d: common_vendor.t(_ctx.$t("vaccine.tag.free"))
      } : {}, {
        e: vaccine.value.recommended
      }, vaccine.value.recommended ? {
        f: common_vendor.t(_ctx.$t("vaccine.tag.recommended"))
      } : {}, {
        g: vaccine.value.seasonal
      }, vaccine.value.seasonal ? {
        h: common_vendor.t(_ctx.$t("vaccine.tag.seasonal"))
      } : {}, {
        i: common_vendor.t(_ctx.$t("vaccine.detail.description")),
        j: common_vendor.t(_ctx.$t(vaccine.value.fullDescKey)),
        k: common_vendor.t(_ctx.$t("vaccine.detail.suitable")),
        l: common_vendor.t(_ctx.$t(vaccine.value.suitableKey)),
        m: common_vendor.t(_ctx.$t("vaccine.detail.notice")),
        n: common_vendor.t(_ctx.$t(vaccine.value.noticeKey)),
        o: common_vendor.f(clinics.value, (clinic, index, i0) => {
          return {
            a: clinic.image,
            b: common_vendor.t(clinic.name),
            c: common_vendor.t(clinic.address),
            d: common_vendor.f(clinic.tags, (tag, idx, i1) => {
              return {
                a: common_vendor.t(tag),
                b: idx
              };
            }),
            e: index,
            f: common_vendor.o(($event) => selectClinic(clinic), index)
          };
        }),
        p: common_vendor.t(_ctx.$t("vaccine.detail.price")),
        q: vaccine.value.price > 0
      }, vaccine.value.price > 0 ? {
        r: common_vendor.t(vaccine.value.price)
      } : {
        s: common_vendor.t(_ctx.$t("vaccine.free"))
      }, {
        t: common_vendor.t(_ctx.$t("vaccine.book")),
        v: common_vendor.o(bookVaccine),
        w: common_vendor.gei(_ctx, "")
      });
    };
  }
};
wx.createPage(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/vaccine/detail.js.map