WXL
11 小时以前 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
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
  __name: "index",
  setup(__props) {
    const searchKey = common_vendor.ref("");
    const hospitals = common_vendor.ref([
      {
        id: 1,
        name: "青岛镜湖医院",
        address: "青岛连胜马路33号",
        image: "/static/hospital/kiang-wu.png",
        tags: ["综合医院", "24小时急诊", "特需门诊"],
        rating: 4.8,
        distance: 2.5
      },
      {
        id: 2,
        name: "青岛科大医院",
        address: "青岛氹仔大学大马路",
        image: "/static/hospital/must.png",
        tags: ["大学医院", "专科门诊", "中医科"],
        rating: 4.7,
        distance: 5.8
      }
    ]);
    const selectHospital = (hospital) => {
      getApp().globalData.currentHospitalId = hospital.id;
      common_vendor.index.navigateTo({
        url: `/pages/department/index?hospitalId=${hospital.id}`,
        fail: (err) => {
          common_vendor.index.__f__("error", "at pages/appointment/index.vue:82", "导航失败:", err);
          common_vendor.index.redirectTo({
            url: `/pages/department/index?hospitalId=${hospital.id}`,
            fail: (err2) => {
              common_vendor.index.__f__("error", "at pages/appointment/index.vue:87", "重定向失败:", err2);
            }
          });
        }
      });
    };
    return (_ctx, _cache) => {
      return {
        a: _ctx.$t("appointment.search.placeholder"),
        b: searchKey.value,
        c: common_vendor.o(($event) => searchKey.value = $event.detail.value),
        d: common_vendor.f(hospitals.value, (hospital, index, i0) => {
          return {
            a: hospital.image,
            b: common_vendor.t(hospital.name),
            c: common_vendor.t(hospital.address),
            d: common_vendor.f(hospital.tags, (tag, idx, i1) => {
              return {
                a: common_vendor.t(tag),
                b: idx
              };
            }),
            e: common_vendor.t(hospital.rating),
            f: common_vendor.t(hospital.distance),
            g: common_vendor.o(($event) => selectHospital(hospital), index),
            h: index
          };
        }),
        e: common_vendor.gei(_ctx, "")
      };
    };
  }
};
wx.createPage(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/appointment/index.js.map