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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
  __name: "detail",
  setup(__props) {
    const department = common_vendor.ref({
      id: 1,
      name: "心内科",
      icon: "/static/department/cardiology.png",
      description: "主要诊治心血管疾病,包括冠心病、高血压等",
      doctorCount: 8,
      rating: 4.9,
      appointmentCount: 2580,
      doctors: [
        {
          id: 1,
          name: "张医生",
          title: "主任医师",
          avatar: "/static/doctor/doctor1.jpg",
          specialty: "冠心病、心律失常",
          rating: 4.9,
          ratingCount: 1280
        }
        // ... 更多医生数据
      ],
      services: [
        {
          name: "普通门诊",
          price: 60
        },
        {
          name: "专家门诊",
          price: 120
        },
        {
          name: "心电图检查",
          price: 80
        }
      ],
      guide: [
        {
          title: "预约挂号",
          description: "在线选择医生和就诊时间进行预约"
        },
        {
          title: "取号就诊",
          description: "就诊当天提前半小时到医院取号"
        },
        {
          title: "医生诊疗",
          description: "按时到诊室就医,出示预约信息"
        }
      ],
      reviews: [
        {
          avatar: "/static/avatar/user1.jpg",
          name: "张**",
          time: "2024-03-20",
          content: "医生很专业,态度也很好,解答很详细",
          reply: "感谢您的信任,祝您身体健康!"
        }
      ]
    });
    const selectDoctor = (doctor) => {
      common_vendor.index.navigateTo({
        url: `/pages/appointment/doctor?doctorId=${doctor.id}`
      });
    };
    const bookDepartment = () => {
      common_vendor.index.navigateTo({
        url: `/pages/appointment/doctor?departmentId=${department.value.id}&hospitalId=${hospital.value.id}`
      });
    };
    const hospital = common_vendor.ref({
      id: 1,
      name: "青岛镜湖医院",
      logo: "/static/hospital/kiang-wu.jpg",
      address: "青岛连胜马路33号",
      tags: ["综合医院", "24小时急诊", "特需门诊"],
      rating: 4.8,
      distance: 2.5
    });
    const navigateToHospital = () => {
      common_vendor.index.navigateTo({
        url: `/pages/hospital/detail?id=${hospital.value.id}`
      });
    };
    common_vendor.onMounted(() => {
      var _a, _b, _c, _d;
      const pages = getCurrentPages();
      const page = pages[pages.length - 1];
      (_b = (_a = page.$page) == null ? void 0 : _a.options) == null ? void 0 : _b.id;
      const hospitalId = (_d = (_c = page.$page) == null ? void 0 : _c.options) == null ? void 0 : _d.hospitalId;
      loadHospitalInfo(hospitalId);
      loadDepartmentDetail();
    });
    const loadHospitalInfo = (hospitalId) => {
      common_vendor.index.__f__("log", "at pages/department/detail.vue:265", "加载医院信息:", hospitalId);
    };
    const loadDepartmentDetail = (id) => {
    };
    const getStepColor = (index) => {
      const colors = [
        "#0f95b0, #89C4C1",
        "#747CF9, #9B7CF9",
        "#FF9B6A, #FF6B8B",
        "#4DCEA5, #2FB4AE"
      ];
      return colors[index % colors.length];
    };
    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: department.value.icon,
        g: common_vendor.t(department.value.name),
        h: common_vendor.t(department.value.description),
        i: common_vendor.t(department.value.doctorCount),
        j: common_vendor.t(department.value.rating),
        k: common_vendor.t(department.value.appointmentCount),
        l: common_vendor.f(department.value.doctors, (doctor, index, i0) => {
          return {
            a: doctor.avatar,
            b: common_vendor.t(doctor.name),
            c: common_vendor.t(doctor.title),
            d: common_vendor.t(doctor.specialty),
            e: common_vendor.t(doctor.rating),
            f: common_vendor.t(doctor.ratingCount),
            g: index,
            h: common_vendor.o(($event) => selectDoctor(doctor), index)
          };
        }),
        m: common_vendor.f(department.value.services, (service, index, i0) => {
          return {
            a: common_vendor.t(service.name),
            b: common_vendor.t(service.price),
            c: index
          };
        }),
        n: common_vendor.f(department.value.guide, (step, index, i0) => {
          return {
            a: common_vendor.t(index + 1),
            b: `linear-gradient(135deg, ${getStepColor(index)})`,
            c: common_vendor.t(step.title),
            d: common_vendor.t(step.description),
            e: index
          };
        }),
        o: common_vendor.t(department.value.reviews.length),
        p: common_vendor.f(department.value.reviews, (review, index, i0) => {
          return common_vendor.e({
            a: review.avatar,
            b: common_vendor.t(review.name),
            c: common_vendor.t(review.time),
            d: common_vendor.t(review.content),
            e: review.reply
          }, review.reply ? {
            f: common_vendor.t(review.reply)
          } : {}, {
            g: index
          });
        }),
        q: common_vendor.o(bookDepartment),
        r: common_vendor.gei(_ctx, "")
      };
    };
  }
};
wx.createPage(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/department/detail.js.map