[AI Generated]: feat(Views): 新增测量报告页面

This commit is contained in:
17792275749
2026-05-13 09:55:15 +08:00
parent 780a1e3202
commit d1331437fa
6 changed files with 570 additions and 1 deletions
@@ -0,0 +1,76 @@
/** 测量报告数据 */
interface ReportData {
/** 测量时间 */
measureTime: string
/** 用户姓名 */
userName: string
/** 体重整数部分 */
weight: number
/** 体重小数部分,如 ".20" */
weightDecimal: string
/** 测量时间显示,如 "05-06 09:30" */
weightDate: string
/** 与上次相比差值(负=减轻,正=增重) */
diff: number
/** 身高(cm) */
height: number
/** BMI 值 */
bmi: number
/** BMI 评级标签,如 "标准" */
bmiLabel: string
/** 标准体重(kg) */
stdWeight: number
/** 体脂率(%) */
bodyFat: number
/** 体脂肪(kg) */
bodyFatMass: number
/** 基础代谢(kcal) */
bmr: number
}
/**
* 测量报告页
* 展示单次测量的详细数据报告
*/
Page({
data: {
// 报告数据
report: {
measureTime: '2026-05-06 09:30',
userName: '陈万宁',
weight: 68,
weightDecimal: '.20',
weightDate: '05-06 09:30',
diff: -2.6,
height: 176,
bmi: 22.4,
bmiLabel: '标准',
stdWeight: 67.2,
bodyFat: 22.3,
bodyFatMass: 52.1,
bmr: 1652
} as ReportData
},
onLoad(options) {
// TODO: 根据 options.id 获取报告详情
},
onReady() {},
onShow() {},
onHide() {},
onUnload() {},
/**
* 分享报告
*/
onShareAppMessage(): WechatMiniprogram.Page.ICustomShareContent {
return {
title: `${this.data.report.userName}的测量报告`,
path: '/pages/measurementReport/measurementReport'
}
}
})