"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