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
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
  __name: "list",
  setup(__props) {
    const categoryName = common_vendor.ref("");
    const departments = common_vendor.ref([
      {
        id: 1,
        name: "心内科",
        icon: "/static/department/cardiology.png",
        description: "心血管疾病诊治",
        status: "available",
        statusText: "可预约",
        fee: 60,
        doctorCount: 8,
        availableCount: 25,
        rating: 4.9,
        doctors: [
          {
            name: "张医生",
            title: "主任医师",
            avatar: "/static/doctor/doctor1.jpg"
          },
          {
            name: "李医生",
            title: "副主任医师",
            avatar: "/static/doctor/doctor2.jpg"
          }
        ]
      }
      // ... 更多科室数据
    ]);
    const hospital = common_vendor.ref({
      id: 1,
      name: "青岛镜湖医院",
      logo: "/static/hospital/kiang-wu.jpg",
      address: "青岛连胜马路33号",
      tags: ["综合医院", "24小时急诊", "特需门诊"],
      rating: 4.8,
      distance: 2.5
    });
    common_vendor.onMounted(() => {
      var _a, _b, _c, _d;
      const pages = getCurrentPages();
      const page = pages[pages.length - 1];
      const category = ((_b = (_a = page.$page) == null ? void 0 : _a.options) == null ? void 0 : _b.category) || "全部科室";
      const hospitalId = (_d = (_c = page.$page) == null ? void 0 : _c.options) == null ? void 0 : _d.hospitalId;
      categoryName.value = category;
      loadHospitalInfo(hospitalId);
      loadDepartments();
    });
    const loadHospitalInfo = (hospitalId) => {
      common_vendor.index.__f__("log", "at pages/department/list.vue:141", "加载医院信息:", hospitalId);
    };
    const navigateToDetail = (dept) => {
      common_vendor.index.navigateTo({
        url: `/pages/department/detail?id=${dept.id}&hospitalId=${hospital.value.id}`
      });
    };
    const bookDepartment = (dept) => {
      common_vendor.index.navigateTo({
        url: `/pages/appointment/doctor?departmentId=${dept.id}`
      });
    };
    const loadDepartments = (category) => {
    };
    const navigateToHospital = () => {
      common_vendor.index.navigateTo({
        url: `/pages/hospital/detail?id=${hospital.value.id}`
      });
    };
    return (_ctx, _cache) => {
      return {
        a: hospital.value.logo,
        b: common_vendor.t(hospital.value.name),
        c: common_vendor.t(hospital.value.address),
        d: common_vendor.f(hospital.value.tags, (tag, idx, i0) => {
          return {
            a: common_vendor.t(tag),
            b: idx
          };
        }),
        e: common_vendor.o(navigateToHospital),
        f: common_vendor.t(categoryName.value),
        g: common_vendor.t(departments.value.length),
        h: common_vendor.f(departments.value, (dept, index, i0) => {
          return {
            a: dept.icon,
            b: common_vendor.t(dept.name),
            c: common_vendor.t(dept.description),
            d: common_vendor.t(dept.statusText),
            e: common_vendor.n(dept.status),
            f: common_vendor.t(dept.fee === 0 ? "免费" : `¥${dept.fee}`),
            g: dept.fee === 0 ? 1 : "",
            h: common_vendor.t(dept.doctorCount),
            i: common_vendor.t(dept.availableCount),
            j: common_vendor.t(dept.rating),
            k: common_vendor.f(dept.doctors, (doctor, idx, i1) => {
              return {
                a: doctor.avatar,
                b: common_vendor.t(doctor.name),
                c: common_vendor.t(doctor.title),
                d: idx
              };
            }),
            l: common_vendor.o(($event) => bookDepartment(dept), index),
            m: index,
            n: common_vendor.o(($event) => navigateToDetail(dept), index)
          };
        }),
        i: hospital.value.logo,
        j: common_vendor.t(hospital.value.name),
        k: common_vendor.gei(_ctx, "")
      };
    };
  }
};
wx.createPage(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/department/list.js.map