"use strict";
|
const common_vendor = require("../../common/vendor.js");
|
const _sfc_main = {
|
__name: "health-records",
|
setup(__props) {
|
const healthData = common_vendor.ref({
|
height: 175,
|
weight: 65,
|
bmi: "21.3",
|
bloodType: "A"
|
});
|
const healthRecords = common_vendor.ref([
|
{
|
icon: "/static/health/blood-pressure.png",
|
title: "血压记录",
|
time: "今天 09:30",
|
path: "/pages/health/blood-pressure"
|
},
|
{
|
icon: "/static/health/heart-rate.png",
|
title: "心率记录",
|
time: "今天 08:15",
|
path: "/pages/health/heart-rate"
|
},
|
{
|
icon: "/static/health/blood-sugar.png",
|
title: "血糖记录",
|
time: "昨天 20:30",
|
path: "/pages/health/blood-sugar"
|
}
|
]);
|
const healthReports = common_vendor.ref([
|
{
|
name: "年度体检报告",
|
date: "2024-03-20",
|
description: "本次体检结果总体良好,建议加强运动,注意作息规律。",
|
tags: ["正常", "建议复查"],
|
path: "/pages/health/report-detail"
|
},
|
{
|
name: "心电图检查报告",
|
date: "2024-03-15",
|
description: "心电图检查未见明显异常,窦性心律。",
|
tags: ["正常"],
|
path: "/pages/health/report-detail"
|
}
|
]);
|
const viewRecord = (record) => {
|
common_vendor.index.navigateTo({
|
url: record.path
|
});
|
};
|
const viewReport = (report) => {
|
common_vendor.index.navigateTo({
|
url: `${report.path}?id=${report.id}`
|
});
|
};
|
const showUpdateModal = () => {
|
common_vendor.index.navigateTo({
|
url: "/pages/health/update-data"
|
});
|
};
|
return (_ctx, _cache) => {
|
return {
|
a: common_vendor.t(healthData.value.height || "--"),
|
b: common_vendor.t(healthData.value.weight || "--"),
|
c: common_vendor.t(healthData.value.bmi || "--"),
|
d: common_vendor.t(healthData.value.bloodType || "--"),
|
e: common_vendor.o(showUpdateModal),
|
f: common_vendor.f(healthRecords.value, (item, index, i0) => {
|
return {
|
a: item.icon,
|
b: common_vendor.t(item.title),
|
c: common_vendor.t(item.time),
|
d: index,
|
e: common_vendor.o(($event) => viewRecord(item), index)
|
};
|
}),
|
g: common_vendor.f(healthReports.value, (report, index, i0) => {
|
return {
|
a: common_vendor.t(report.name),
|
b: common_vendor.t(report.date),
|
c: common_vendor.t(report.description),
|
d: common_vendor.f(report.tags, (tag, idx, i1) => {
|
return {
|
a: common_vendor.t(tag),
|
b: idx
|
};
|
}),
|
e: index,
|
f: common_vendor.o(($event) => viewReport(report), index)
|
};
|
}),
|
h: common_vendor.gei(_ctx, "")
|
};
|
};
|
}
|
};
|
wx.createPage(_sfc_main);
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/my/health-records.js.map
|