From e663982b779eb230af1b38e038f87784653d68cd Mon Sep 17 00:00:00 2001 From: liuyunqin Date: Tue, 25 Aug 2026 11:58:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=91=98=E5=B7=A5=E7=AB=AF=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E8=AF=A6=E6=83=85=E9=A1=B5=E5=91=A8=E6=97=A5=E5=8E=86?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9D=A5=E6=BA=90=E6=A0=87=E7=AD=BE=EF=BC=8C?= =?UTF-8?q?=E8=BF=90=E5=8A=A8/=E4=BD=93=E9=87=8D=E9=A1=B5=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=95=B0=E6=8D=AE=E6=9D=A5=E6=BA=90=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E5=B9=B6=E7=A7=BB=E9=99=A4=E5=BA=95=E9=83=A8=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=8C=89=E9=92=AE=EF=BC=9B=E4=BD=93=E9=87=8D=E9=A1=B5=E8=BA=AB?= =?UTF-8?q?=E9=AB=98=E7=A7=A4=E6=9B=B4=E5=90=8D=E4=B8=BA=E4=BD=93=E9=87=8D?= =?UTF-8?q?=E7=A7=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../weight-management/eat-detail-v2.html | 8 +- .../weight-management/exercise-detail-v2.html | 111 ++++++++++++++++-- .../weight-management/weight-detail-v2.html | 98 ++++++++++++++-- 3 files changed, 194 insertions(+), 23 deletions(-) diff --git a/employee-app/weight-management/eat-detail-v2.html b/employee-app/weight-management/eat-detail-v2.html index 1077a55..7b07637 100644 --- a/employee-app/weight-management/eat-detail-v2.html +++ b/employee-app/weight-management/eat-detail-v2.html @@ -64,6 +64,11 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items: .cal-day__ring--auto { border-color: #1890ff; } .cal-day__ring--manual { border-color: #fa8c16; } .cal-day__ring--mixed { border-color: #722ed1; } +/* 日期下来源标签:智 / 自 / 智+自 */ +.cal-day__src { font-size: 9px; font-weight: 600; margin-top: 3px; line-height: 1.2; height: 11px; } +.cal-day__src--auto { color: #1890ff; } +.cal-day__src--manual { color: #fa8c16; } +.cal-day__src--mixed { color: #722ed1; } /* ===== 图例:三种来源 ===== */ .month-picker__legend { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 8px; padding-top: 8px; font-size: 11px; color: #666; } @@ -567,7 +572,8 @@ function renderWeek() { '
' + (daySource ? '
' : '') + '' + dayNum + '' + - '
'; + '' + + (daySource ? '
' + (daySource === 'auto' ? '智' : daySource === 'manual' ? '自' : '智+自') + '
' : '
'); container.appendChild(dayEl); } diff --git a/employee-app/weight-management/exercise-detail-v2.html b/employee-app/weight-management/exercise-detail-v2.html index 92a9f98..e1a76ee 100644 --- a/employee-app/weight-management/exercise-detail-v2.html +++ b/employee-app/weight-management/exercise-detail-v2.html @@ -67,6 +67,13 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items: .cal-day__ring--wechat { border-color: #597ef7; } .cal-day__ring--manual { border-color: #fa8c16; } .cal-day__ring--mixed { border-color: #722ed1; } +/* 日期下来源标签 */ +.cal-day__src { font-size: 9px; font-weight: 600; margin-top: 3px; line-height: 1.2; height: 11px; } +.cal-day__src--wearable { color: #1890ff; } +.cal-day__src--equip { color: #52c41a; } +.cal-day__src--wechat { color: #597ef7; } +.cal-day__src--manual { color: #fa8c16; } +.cal-day__src--mixed { color: #722ed1; } /* ===== 图例 ===== */ .month-picker__legend { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 8px; padding-top: 8px; font-size: 11px; color: #666; } @@ -133,6 +140,27 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items: .toolbar__btn--manual { background: linear-gradient(160deg, #73d13d, #389e0d); box-shadow: 0 2px 10px rgba(82,196,26,0.3); } .toolbar__btn svg { width: 15px; height: 15px; } +/* ===== 来源区域卡片(穿戴/器械/微信/自记) ===== */ +.source-card { background: #fff; border-radius: 16px; margin: 12px 12px 0; padding: 14px 12px 12px; box-shadow: 0 4px 14px rgba(0,0,0,0.04); } +.source-card__title { font-size: 16px; font-weight: 800; color: #1a1a1a; margin-bottom: 10px; } +.type-cards { display: flex; gap: 6px; } +.type-card { flex: 1; background: #f7f8fa; border-radius: 12px; padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; position: relative; transition: background .2s; } +.type-card:hover { background: #f0f2f5; } +.type-card:active { transform: scale(0.97); } +.type-card__icon-wrap { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-bottom: 4px; } +.type-card__icon-wrap--wearable { background: #e6f7ff; } +.type-card__icon-wrap--equip { background: #f6ffed; } +.type-card__icon-wrap--wechat { background: #f0f5ff; } +.type-card__icon-wrap--manual { background: #fff7e6; } +.type-card__icon-wrap svg { width: 16px; height: 16px; } +.type-card__label { font-size: 11px; font-weight: 700; color: #1a1a1a; margin-bottom: 1px; } +.type-card__kcal { font-size: 10px; color: #666; line-height: 1.3; } +.type-card__kcal em { font-style: normal; font-weight: 700; color: #1a1a1a; } +.type-card__empty { font-size: 10px; color: #bbb; } +/* 微信同步按钮 */ +.type-card__sync { position: absolute; top: 4px; right: 4px; background: #597ef7; color: #fff; font-size: 9px; padding: 2px 6px; border-radius: 6px; font-weight: 600; cursor: pointer; white-space: nowrap; border: none; } +.type-card__sync:active { opacity: 0.8; } + /* ===== 变化趋势卡片 ===== */ .trend-card { background: #fff; border-radius: 16px; margin: 12px 12px 0; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,0.04); } .trend-card__header { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 0; } @@ -331,6 +359,62 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items: + +
+
+ +
+
+ + + + + + +
+
穿戴
+
5600
+
+ +
+
+ + + + + + +
+
器械
+
220 千卡
+
+ +
+
+ + + + + +
+
微信
+
6800
+ +
+ +
+
+ + + + +
+
自记
+
3200
+
+
+
+
@@ -525,14 +609,6 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
- -
- -
-
diff --git a/employee-app/weight-management/weight-detail-v2.html b/employee-app/weight-management/weight-detail-v2.html index 1e14003..260a29f 100644 --- a/employee-app/weight-management/weight-detail-v2.html +++ b/employee-app/weight-management/weight-detail-v2.html @@ -74,8 +74,31 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items: .cal-day__ring { position: absolute; inset: 0; border-radius: 50%; border: 2.5px solid transparent; z-index: 1; } .cal-day__ring--manual { border-color: #c4b5fd; } /* 自记 浅紫 */ .cal-day__ring--bluetooth { border-color: #8b5cf6; } /* 蓝牙称 紫 */ -.cal-day__ring--stadiometer { border-color: #5470c6; } /* 身高秤 蓝 */ +.cal-day__ring--stadiometer { border-color: #5470c6; } /* 体重秤 蓝 */ .cal-day__ring--bodyanalyzer { border-color: #1e3a5f; } /* 体脂仪 深蓝 */ +/* 日期下来源标签 */ +.cal-day__src { font-size: 9px; font-weight: 600; margin-top: 3px; line-height: 1.2; height: 11px; } +.cal-day__src--manual { color: #c4b5fd; } +.cal-day__src--bluetooth { color: #8b5cf6; } +.cal-day__src--stadiometer { color: #5470c6; } +.cal-day__src--bodyanalyzer { color: #1e3a5f; } + +/* ===== 数据来源区域卡片 ===== */ +.source-card { background: #fff; border-radius: 16px; margin: 12px 12px 0; padding: 14px 12px 12px; box-shadow: 0 4px 14px rgba(0,0,0,0.04); } +.type-cards { display: flex; gap: 6px; } +.type-card { flex: 1; background: #f7f8fa; border-radius: 12px; padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; position: relative; transition: background .2s; } +.type-card:hover { background: #f0f2f5; } +.type-card:active { transform: scale(0.97); } +.type-card__icon-wrap { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-bottom: 4px; } +.type-card__icon-wrap--stadiometer { background: #eef2fb; } +.type-card__icon-wrap--bluetooth { background: #f3efff; } +.type-card__icon-wrap--bodyanalyzer { background: #e8edf5; } +.type-card__icon-wrap--manual { background: #fff7e6; } +.type-card__icon-wrap svg { width: 16px; height: 16px; } +.type-card__label { font-size: 11px; font-weight: 700; color: #1a1a1a; margin-bottom: 1px; } +.type-card__val { font-size: 10px; color: #666; line-height: 1.3; } +.type-card__val em { font-style: normal; font-weight: 700; color: #1a1a1a; } +.type-card__val--empty { color: #bbb; } /* ===== 日历卡片内:分隔线 + 最新记录区 ===== */ .cal-divider { height: 1px; background: #f0f0f0; margin: 14px 4px 14px; } @@ -303,7 +326,7 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
自记 蓝牙称 - 身高秤 + 体重秤 体脂仪
@@ -356,6 +379,58 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items: + +
+
+ +
+
+ + + + + +
+
体重秤
+
72.4 kg
+
+ +
+
+ + + +
+
蓝牙称
+
72.1 kg
+
+ +
+
+ + + + + + +
+
体脂仪
+
尚未记录
+
+ +
+
+ + + + +
+
自记
+
72.6 kg
+
+
+
+
@@ -735,14 +810,6 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
- -
- -
-
@@ -847,7 +914,8 @@ function renderWeek() { '
' + (hasData ? '
' : '') + '' + dayNum + '' + - '
'; + '
' + + (hasData ? '
' + ({ manual: '自记', bluetooth: '蓝牙称', stadiometer: '体重秤', bodyanalyzer: '体脂仪' }[daySource] || '自记') + '
' : '
'); container.appendChild(dayEl); } @@ -1124,11 +1192,15 @@ function renderWaistMetric(waist) { /* 来源标记文案映射 */ function sourceLabel(src) { - var map = { manual: '自记', bluetooth: '蓝牙称', stadiometer: '身高秤', bodyanalyzer: '体脂仪' }; + var map = { manual: '自记', bluetooth: '蓝牙称', stadiometer: '体重秤', bodyanalyzer: '体脂仪' }; return map[src] || '自记'; } /* ===== 工具栏按钮 ===== */ +function showSourceTip(name) { + alert(name + ':查看今日该来源的体重记录'); +} + function addRecord(type) { openRecordSheet(); } @@ -1403,7 +1475,7 @@ function renderRecordList(range) { return; } - var srcMap = { manual: '自记', bluetooth: '蓝牙称', stadiometer: '身高秤', bodyanalyzer: '体脂仪' }; + var srcMap = { manual: '自记', bluetooth: '蓝牙称', stadiometer: '体重秤', bodyanalyzer: '体脂仪' }; // 来源 → 详细报告页跳转地址(体脂仪跳转独立报告页,其余复用 report-detail.html) var reportUrlMap = { bluetooth: 'report-detail.html?device=bluetooth',