WXL
18 小时以前 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
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
  __name: "guide",
  setup(__props) {
    const searchKey = common_vendor.ref("");
    const categories = [
      {
        name: "内科",
        icon: "/static/department/internal.png",
        count: 8,
        departments: ["心内科", "消化内科", "呼吸内科", "神经内科"]
      },
      {
        name: "外科",
        icon: "/static/department/surgery.png",
        count: 6,
        departments: ["普通外科", "骨科", "神经外科"]
      },
      {
        name: "儿科",
        icon: "/static/department/pediatrics.png",
        count: 4,
        departments: ["儿科门诊", "儿童保健科"]
      },
      {
        name: "妇产科",
        icon: "/static/department/gynecology.png",
        count: 3,
        departments: ["妇科", "产科", "计划生育"]
      },
      {
        name: "五官科",
        icon: "/static/department/ent.png",
        count: 5,
        departments: ["耳鼻喉科", "眼科", "口腔科"]
      },
      {
        name: "中医科",
        icon: "/static/department/tcm.png",
        count: 4,
        departments: ["中医内科", "针灸科", "推拿科"]
      }
    ];
    const commonDiseases = [
      "感冒发烧",
      "高血压",
      "糖尿病",
      "颈椎病",
      "胃炎",
      "失眠",
      "头痛",
      "咳嗽"
    ];
    const hotDepartments = [
      {
        name: "心内科",
        description: "心血管疾病诊治",
        appointmentCount: 2580,
        rating: 4.9
      },
      {
        name: "儿科门诊",
        description: "儿童疾病诊治",
        appointmentCount: 2145,
        rating: 4.8
      },
      {
        name: "骨科",
        description: "骨关节疾病诊治",
        appointmentCount: 1980,
        rating: 4.8
      },
      {
        name: "消化内科",
        description: "消化系统疾病诊治",
        appointmentCount: 1860,
        rating: 4.7
      },
      {
        name: "妇产科",
        description: "妇科疾病诊治",
        appointmentCount: 1750,
        rating: 4.7
      }
    ];
    const selectCategory = (category) => {
      common_vendor.index.navigateTo({
        url: `/pages/department/list?category=${category.name}`
      });
    };
    const searchDisease = (disease) => {
      searchKey.value = disease;
    };
    const navigateToDepartment = (dept) => {
      common_vendor.index.navigateTo({
        url: `/pages/department/detail?name=${dept.name}`
      });
    };
    return (_ctx, _cache) => {
      return {
        a: searchKey.value,
        b: common_vendor.o(($event) => searchKey.value = $event.detail.value),
        c: common_vendor.f(categories, (category, index, i0) => {
          return {
            a: category.icon,
            b: common_vendor.t(category.name),
            c: common_vendor.t(category.count),
            d: index,
            e: common_vendor.o(($event) => selectCategory(category), index)
          };
        }),
        d: common_vendor.f(commonDiseases, (disease, index, i0) => {
          return {
            a: common_vendor.t(disease),
            b: index,
            c: common_vendor.o(($event) => searchDisease(disease), index)
          };
        }),
        e: common_vendor.f(hotDepartments, (dept, index, i0) => {
          return {
            a: common_vendor.t(index + 1),
            b: index < 3 ? 1 : "",
            c: common_vendor.t(dept.name),
            d: common_vendor.t(dept.description),
            e: common_vendor.t(dept.appointmentCount),
            f: common_vendor.t(dept.rating),
            g: index,
            h: common_vendor.o(($event) => navigateToDepartment(dept), index)
          };
        }),
        f: common_vendor.gei(_ctx, "")
      };
    };
  }
};
wx.createPage(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/department/guide.js.map