"use strict";
|
const common_vendor = require("../../common/vendor.js");
|
const _sfc_main = {
|
__name: "detail",
|
setup(__props) {
|
const hospital = common_vendor.ref({
|
id: 1,
|
name: "青岛镜湖医院",
|
type: "三级甲等综合医院",
|
logo: "/static/hospital/kiang-wu.jpg",
|
coverImage: "/static/hospital/kiang-wu.png",
|
address: "青岛连胜马路33号",
|
phone: "+853 2837 1333",
|
hours: "门诊:周一至周日 8:00-22:00\n急诊:24小时",
|
tags: ["综合医院", "24小时急诊", "特需门诊"],
|
introduction: "青岛镜湖医院创立于1871年,是青岛历史最悠久的非牟利医疗机构...",
|
images: [
|
"/static/hospital/image1.jpg",
|
"/static/hospital/image2.jpg",
|
"/static/hospital/image3.jpg"
|
],
|
featuredDepartments: [
|
{
|
id: 1,
|
name: "心内科",
|
icon: "/static/department/cardiology.png",
|
description: "心血管疾病诊治"
|
}
|
],
|
latitude: 22.1934,
|
longitude: 113.5529,
|
transport: [
|
{
|
type: "公交路线",
|
route: "3、3X、10、10A、23、32等路公交车到镜湖医院站"
|
},
|
{
|
type: "轻轨路线",
|
route: "青岛轻轨氹仔线到科技大学站,步行约10分钟"
|
}
|
]
|
});
|
const previewImage = (index) => {
|
common_vendor.index.previewImage({
|
urls: hospital.value.images,
|
current: index
|
});
|
};
|
const navigateToDepartment = (dept) => {
|
common_vendor.index.navigateTo({
|
url: `/pages/department/detail?id=${dept.id}&hospitalId=${hospital.value.id}`
|
});
|
};
|
common_vendor.onMounted(() => {
|
var _a, _b;
|
const pages = getCurrentPages();
|
const page = pages[pages.length - 1];
|
(_b = (_a = page.$page) == null ? void 0 : _a.options) == null ? void 0 : _b.id;
|
loadHospitalDetail();
|
});
|
const loadHospitalDetail = (id) => {
|
};
|
return (_ctx, _cache) => {
|
return {
|
a: hospital.value.coverImage,
|
b: hospital.value.logo,
|
c: common_vendor.t(hospital.value.name),
|
d: common_vendor.t(hospital.value.type),
|
e: common_vendor.f(hospital.value.tags, (tag, idx, i0) => {
|
return {
|
a: common_vendor.t(tag),
|
b: idx
|
};
|
}),
|
f: common_vendor.t(hospital.value.address),
|
g: common_vendor.t(hospital.value.phone),
|
h: common_vendor.t(hospital.value.hours),
|
i: common_vendor.t(hospital.value.introduction),
|
j: common_vendor.f(hospital.value.images, (img, idx, i0) => {
|
return {
|
a: idx,
|
b: img,
|
c: common_vendor.o(($event) => previewImage(idx), idx)
|
};
|
}),
|
k: common_vendor.f(hospital.value.featuredDepartments, (dept, index, i0) => {
|
return {
|
a: dept.icon,
|
b: common_vendor.t(dept.name),
|
c: common_vendor.t(dept.description),
|
d: index,
|
e: common_vendor.o(($event) => navigateToDepartment(dept), index)
|
};
|
}),
|
l: hospital.value.latitude,
|
m: hospital.value.longitude,
|
n: [{
|
latitude: hospital.value.latitude,
|
longitude: hospital.value.longitude,
|
iconPath: "/static/icons/marker.png",
|
width: 32,
|
height: 32
|
}],
|
o: common_vendor.f(hospital.value.transport, (item, idx, i0) => {
|
return {
|
a: common_vendor.t(item.type),
|
b: common_vendor.t(item.route),
|
c: idx
|
};
|
}),
|
p: common_vendor.gei(_ctx, "")
|
};
|
};
|
}
|
};
|
wx.createPage(_sfc_main);
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/hospital/detail.js.map
|