From 01bbcdecaf381ffb537223b20c7f9928a6c0376b Mon Sep 17 00:00:00 2001 From: 17792275749 <812100002@qq.com> Date: Thu, 20 Aug 2026 10:03:26 +0800 Subject: [PATCH] =?UTF-8?q?feat(detailedReport):=20=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E8=AF=A6=E7=BB=86=E6=8A=A5=E5=91=8A=E6=8C=87=E6=A0=87=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=8E=E5=8D=A1=E7=89=87=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- miniprogram/app.ts | 2 +- .../pages/detailedReport/detailedReport.less | 157 +++++++----------- .../pages/detailedReport/detailedReport.ts | 33 ++-- .../pages/detailedReport/detailedReport.wxml | 110 ++++++------ 4 files changed, 131 insertions(+), 171 deletions(-) diff --git a/miniprogram/app.ts b/miniprogram/app.ts index da96bab..5c89327 100644 --- a/miniprogram/app.ts +++ b/miniprogram/app.ts @@ -1,4 +1,4 @@ -App({ + App({ globalData: {}, onLaunch() {}, diff --git a/miniprogram/pages/detailedReport/detailedReport.less b/miniprogram/pages/detailedReport/detailedReport.less index 5316566..eb22572 100644 --- a/miniprogram/pages/detailedReport/detailedReport.less +++ b/miniprogram/pages/detailedReport/detailedReport.less @@ -147,29 +147,33 @@ } } - /* 卡片 */ - .card { + /* 基础指标 */ + .basicIndicators { width: 100%; - padding: 32rpx; + padding: 38rpx 30rpx; border-radius: 24rpx; - background-color: #FFFFFF; box-sizing: border-box; margin-bottom: 24rpx; + border: 4rpx solid #ffffff; + background: linear-gradient(180deg, #D3E9FF 0%, #FFFFFF 12%); - .card-title { + .basicIndicatorsTitle { + width: 100%; + height: 32rpx; display: flex; + flex-wrap: nowrap; align-items: center; - margin-bottom: 24rpx; + margin-bottom: 40rpx; - .title-bar { + .basicIndicatorsBar { width: 6rpx; height: 20rpx; border-radius: 4rpx; - background-color: #1385FA; margin-right: 16rpx; + background-color: #1385FA; } - .title-text { + .basicIndicatorsTitleText { color: #252535; height: 32rpx; font-size: 32rpx; @@ -177,102 +181,105 @@ } } - /* 基础指标 3 列 2 行 */ - .basic-grid { - .basic-row { + .basicIndicatorsGrid { + width: 100%; + margin-bottom: 32rpx; + + .basicIndicatorsRow { + width: 100%; display: flex; + margin-bottom: 24rpx; + padding-bottom: 24rpx; border-bottom: 2rpx solid #EAECF1; &:last-of-type { - border-bottom: none; + margin-bottom: 0; } - .basic-cell { + .basicIndicatorsCell { flex: 1; + padding: 9rpx 24rpx; box-sizing: border-box; - padding: 24rpx 0; border-right: 2rpx solid #EAECF1; &:last-of-type { border-right: none; } - .basic-label { + .basicIndicatorsLabel { color: #808080; - height: 26rpx; + height: 30rpx; font-size: 26rpx; - line-height: 26rpx; - margin-bottom: 16rpx; + line-height: 30rpx; + margin-bottom: 20rpx; } - .basic-value-row { + .basicIndicatorsValueRow { + width: 100%; display: flex; + flex-wrap: nowrap; align-items: flex-end; - .basic-value { + .basicIndicatorsValue { color: #252535; - height: 48rpx; - font-size: 48rpx; - line-height: 48rpx; + height: 44rpx; + font-size: 44rpx; + line-height: 44rpx; + margin-right: 6rpx; } - .basic-unit { + .basicIndicatorsUnit { color: #252535; height: 26rpx; font-size: 26rpx; + font-weight: bolder; line-height: 26rpx; - margin: 0 0 6rpx 8rpx; - } - - .basic-tag { - height: 30rpx; - padding: 0 10rpx; - font-size: 18rpx; - line-height: 30rpx; - border-radius: 8rpx; - color: #FFFFFF; - background-color: #2AC79F; - margin: 0 0 6rpx 12rpx; } } } } } - /* BMI 刻度 */ - .bmi-scale { - margin-top: 24rpx; + .basicIndicatorsScale { + width: 100%; - .scale-track { + .basicIndicatorsTrack { display: flex; + gap: 6rpx; + flex-wrap: nowrap; height: 20rpx; - border-radius: 6rpx; - overflow: hidden; + margin-bottom: 24rpx; - .scale-block { + .basicIndicatorsBlock { flex: 1; + border-radius: 6rpx; + overflow: hidden; } - .scale-block--low { + .basicIndicatorsBlock--low { background-color: #1385FA; } - .scale-block--normal { + .basicIndicatorsBlock--normal { background-color: #2AC79F; } - .scale-block--over { + .basicIndicatorsBlock--over { background-color: #FFA151; } - .scale-block--obese { + .basicIndicatorsBlock--obese { background-color: #F24439; } } - .scale-row { + .basicIndicatorsScaleRow { + width: 100%; + height: 24rpx; display: flex; - margin-top: 16rpx; + gap: 6rpx; + flex-wrap: nowrap; + margin-bottom: 12rpx; > view { flex: 1; @@ -284,8 +291,12 @@ } } - .scale-row--range { - margin-top: 12rpx; + .basicIndicatorsScaleRow--range { + width: 100%; + height: 20rpx; + display: flex; + gap: 6rpx; + flex-wrap: nowrap; > view { color: #B6B6B6; @@ -295,48 +306,6 @@ } } } - - /* 指标行 */ - .metric-row { - width: 100%; - display: flex; - align-items: center; - padding: 20rpx 0; - - .metric-label { - flex: 1; - color: #77849E; - height: 28rpx; - font-size: 28rpx; - line-height: 28rpx; - } - - .metric-value { - color: #252535; - height: 28rpx; - font-size: 28rpx; - line-height: 28rpx; - margin-right: 24rpx; - } - - .metric-status { - height: 24rpx; - font-size: 24rpx; - line-height: 24rpx; - } - - .metric-status--normal { - color: #2AC79F; - } - - .metric-status--low { - color: #1385FA; - } - - .metric-status--high { - color: #F24439; - } - } } } } diff --git a/miniprogram/pages/detailedReport/detailedReport.ts b/miniprogram/pages/detailedReport/detailedReport.ts index c36b1f7..9b8a201 100644 --- a/miniprogram/pages/detailedReport/detailedReport.ts +++ b/miniprogram/pages/detailedReport/detailedReport.ts @@ -6,15 +6,13 @@ Page({ header: { date: '2026-07-23 16:32', - weight: '68.80', - unit: 'kg', bmi: 'BMI正常', change: '较上次-0.3kg' }, basic: { rows: [ [ - { label: '身高', value: '172', unit: 'cm', tag: '' }, + { label: '体重', value: '172', unit: 'kg', tag: '' }, { label: 'BMI', value: '22.4', unit: '', tag: '标准' }, { label: '体脂率', value: '22.1', unit: '%', tag: '' } ], @@ -69,8 +67,13 @@ Page({ { title: '细胞液分析', items: [ - { label: '细胞内水量', value: '11.4kg', status: '标准', statusClass: 'normal' }, - { label: '细胞外水量', value: '19.1kg', status: '标准', statusClass: 'normal' }, + { label: '细胞内水量', value: '19.1kg', status: '标准', statusClass: 'normal' }, + { label: '细胞外水量', value: '11.4kg', status: '标准', statusClass: 'normal' } + ] + }, + { + title: '进阶成分', + items: [ { label: '无机盐量', value: '2.9kg', status: '不足', statusClass: 'low' }, { label: '身体细胞量', value: '27.4kg', status: '标准', statusClass: 'normal' }, { label: '骨骼肌质量指数', value: '7.2kg/m²', status: '标准', statusClass: 'normal' } @@ -80,22 +83,18 @@ Page({ limbSections: [ { title: '躯干/四肢脂肪', - items: [ - { label: '左臂', value: '2.3kg丨80.9%' }, - { label: '右臂', value: '2.3kg丨80.9%' }, - { label: '左腿', value: '6.3kg丨100%' }, - { label: '右腿', value: '6.3kg丨100%' }, - { label: '躯干', value: '18.4kg丨97.8%' } + rows: [ + [{ label: '左臂', value: '2.3kg丨80.9%' }, { label: '右臂', value: '2.3kg丨80.9%' }], + [{ label: '左腿', value: '6.3kg丨100%' }, { label: '右腿', value: '6.3kg丨100%' }], + [{ label: '躯干', value: '18.4kg丨97.8%' }] ] }, { title: '躯干/四肢肌肉', - items: [ - { label: '左臂', value: '2.3kg丨80.9%' }, - { label: '右臂', value: '2.3kg丨80.9%' }, - { label: '左腿', value: '6.3kg丨100%' }, - { label: '右腿', value: '6.3kg丨100%' }, - { label: '躯干', value: '18.4kg丨97.8%' } + rows: [ + [{ label: '左臂', value: '2.3kg丨80.9%' }, { label: '右臂', value: '2.3kg丨80.9%' }], + [{ label: '左腿', value: '6.3kg丨100%' }, { label: '右腿', value: '6.3kg丨100%' }], + [{ label: '躯干', value: '18.4kg丨97.8%' }] ] } ] diff --git a/miniprogram/pages/detailedReport/detailedReport.wxml b/miniprogram/pages/detailedReport/detailedReport.wxml index 27dabb1..ae1ba92 100644 --- a/miniprogram/pages/detailedReport/detailedReport.wxml +++ b/miniprogram/pages/detailedReport/detailedReport.wxml @@ -35,41 +35,65 @@ - - - - 基础指标 + + + + 基础指标 - - - - - - {{ cell.label }} - - {{ cell.value }} - {{ cell.unit }} - {{ cell.tag }} - - - + + + + 体重 + + 172 + kg + + + + BMI + + 22.4 + + + + 体脂率 + + 22.1 + % + - - - - - - - - - + + + 身体得分 + + 73 + + + + + 健康评估 + + 一般 + + + + + + + + + + + + + 消瘦 正常 超重 肥胖 - + BMI<18.5 18.5≤BMI<24 24≤BMI<28 @@ -78,38 +102,6 @@ - - - - - - {{ section.title }} - - - - {{ item.label }} - {{ item.value }} - {{ item.status }} - - - - - - - - - - - {{ section.title }} - - - - {{ item.label }} - {{ item.value }} - - - -