WXL
20 小时以前 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
"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