feat(miniprogram): 老年友好版本全面重设计 — 5→4 Tab + 首页/健康/消息/我的重写
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled

- TabBar 从 5 Tab 调整为 4 Tab(首页/健康/消息/我的)
- 首页重写为 5 区域布局:问候+进度环+体征2x2+待办+快捷操作
- 健康页重写:体征录入大输入框+趋势柱状图+BLE设备卡片
- 新建消息页:咨询对话+系统通知双 Tab
- 我的页调整:菜单高度64px+新增积分商城入口
- 设计系统更新:色彩对比度提升(WCAG AA)+触控参数+老年友好 mixin
- 新增 ProgressRing 组件(CSS conic-gradient 实现)
- 修复 diagnoses 页面 $suc-l 未定义变量
This commit is contained in:
iven
2026-04-30 22:51:05 +08:00
parent 813843e8cc
commit 50772878da
14 changed files with 1256 additions and 771 deletions

View File

@@ -7,101 +7,160 @@
padding-bottom: calc(120px + env(safe-area-inset-bottom));
}
/* ─── 问候区 ─── */
/* ─── 区域 1问候 + 日期 + 消息 ─── */
.greeting-section {
background: linear-gradient(135deg, $pri 0%, $pri-d 100%);
padding: 48px 32px 72px;
padding: 48px 32px 60px;
color: #fff;
display: flex;
justify-content: space-between;
align-items: flex-start;
align-items: center;
}
.greeting-left {
display: flex;
flex-direction: column;
flex: 1;
}
.greeting-time {
font-size: 26px;
opacity: 0.85;
margin-bottom: 4px;
}
.greeting-name {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: 44px;
.greeting-text {
font-size: 28px;
font-weight: bold;
display: block;
margin-bottom: 6px;
}
.greeting-date {
font-size: 24px;
opacity: 0.7;
margin-top: 8px;
font-size: 22px;
opacity: 0.75;
}
/* ─── 今日健康 ─── */
.health-section {
.greeting-msg {
width: 56px;
height: 56px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.2);
@include flex-center;
&:active {
background: rgba(255, 255, 255, 0.1);
}
}
.greeting-msg-icon {
font-size: 22px;
color: #fff;
font-weight: 600;
}
/* ─── 区域 2今日体征完成度 ─── */
.checkin-card {
background: $card;
border-radius: $r;
box-shadow: $shadow-md;
margin: -36px 24px 24px;
padding: 28px;
margin: -28px 24px 24px;
padding: 24px;
display: flex;
align-items: center;
gap: 24px;
&:active {
opacity: 0.9;
}
}
.section-title {
@include section-title;
.checkin-left {
flex-shrink: 0;
}
.health-grid {
.checkin-right {
flex: 1;
min-width: 0;
}
.checkin-title {
font-size: 26px;
font-weight: 600;
color: $tx;
display: block;
margin-bottom: 12px;
}
.checkin-capsules {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.capsule {
font-size: 22px;
padding: 4px 12px;
border-radius: $r-pill;
font-weight: 500;
&.capsule-done {
background: $acc-l;
color: $acc;
}
&.capsule-pending {
background: $surface-alt;
color: $tx2;
}
}
/* ─── 区域 3今日体征 2x2 ─── */
.vitals-section {
margin: 0 24px 24px;
}
.vitals-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
}
.health-cell {
background: $bg;
border-radius: $r-sm;
padding: 20px 16px;
.vital-card {
background: $card;
border-radius: $r;
padding: 20px;
box-shadow: $shadow-sm;
text-align: center;
transition: opacity 0.2s;
&:active {
opacity: 0.7;
}
}
.health-cell-label {
font-size: 22px;
.vital-label {
font-size: 24px;
color: $tx2;
display: block;
margin-bottom: 8px;
}
.health-cell-value {
.vital-value {
@include serif-number;
font-size: 44px;
font-size: 48px;
font-weight: bold;
color: $tx;
display: block;
line-height: 1.1;
margin-bottom: 8px;
}
.health-cell-bottom {
.vital-bottom {
display: flex;
justify-content: center;
align-items: center;
gap: 8px;
margin-top: 8px;
}
.health-cell-unit {
font-size: 20px;
color: $tx3;
.vital-unit {
font-size: 22px;
color: $tx2;
}
.health-cell-tag {
font-size: 18px;
.vital-tag {
font-size: 22px;
font-weight: 500;
padding: 2px 10px;
border-radius: $r-sm;
@@ -116,89 +175,42 @@
background: $wrn-l;
color: $wrn;
}
}
/* ─── 快捷服务 ─── */
.services-section {
margin: 0 24px 24px;
}
.services-row {
display: flex;
justify-content: space-between;
gap: 8px;
}
.service-btn {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
flex: 1;
&:active {
opacity: 0.7;
&.tag-empty {
background: $surface-alt;
color: $tx2;
}
}
.service-icon-wrap {
width: 88px;
height: 88px;
border-radius: $r;
background: $pri-l;
@include flex-center;
/* ─── 区域 4今日待办 ─── */
.todo-section {
margin: 0 24px 24px;
}
.service-icon-text {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: 32px;
font-weight: bold;
color: $pri;
}
.service-label {
font-size: 22px;
color: $tx2;
text-align: center;
}
/* ─── 待办事项 ─── */
.upcoming-section {
margin: 0 24px;
}
.upcoming-empty {
.todo-empty {
background: $card;
border-radius: $r;
padding: 48px 24px;
padding: 36px 24px;
text-align: center;
box-shadow: $shadow-sm;
}
.upcoming-empty-text {
display: block;
font-size: 28px;
color: $tx2;
margin-bottom: 8px;
}
.upcoming-empty-hint {
display: block;
.todo-empty-text {
font-size: 24px;
color: $tx3;
color: $tx2;
}
.upcoming-list {
.todo-list {
background: $card;
border-radius: $r;
overflow: hidden;
box-shadow: $shadow-sm;
}
.upcoming-item {
.todo-item {
display: flex;
align-items: center;
padding: 24px 24px;
padding: 24px;
border-bottom: 1px solid $bd-l;
&:last-child {
@@ -210,20 +222,36 @@
}
}
.upcoming-item-main {
.todo-icon-wrap {
width: 48px;
height: 48px;
border-radius: $r-sm;
background: $pri-l;
@include flex-center;
margin-right: 16px;
flex-shrink: 0;
}
.todo-icon-char {
font-size: 24px;
font-weight: bold;
color: $pri;
}
.todo-info {
flex: 1;
min-width: 0;
}
.upcoming-item-title {
.todo-title {
font-size: 28px;
color: $tx;
font-weight: 600;
display: block;
margin-bottom: 4px;
font-weight: 500;
}
.upcoming-item-sub {
.todo-sub {
font-size: 22px;
color: $tx2;
display: block;
@@ -232,158 +260,44 @@
white-space: nowrap;
}
.upcoming-item-tag {
font-size: 20px;
font-weight: 500;
padding: 4px 14px;
border-radius: $r-sm;
flex-shrink: 0;
margin-right: 12px;
&.tag-ok {
background: $acc-l;
color: $acc;
}
&.tag-warn {
background: $wrn-l;
color: $wrn;
}
&.tag-default {
background: $bd-l;
color: $tx2;
}
}
.upcoming-item-arrow {
.todo-arrow {
font-size: 32px;
color: $tx3;
flex-shrink: 0;
}
/* ─── 健康空状态 ─── */
.health-empty {
background: $bg;
border-radius: $r-sm;
padding: 40px 24px;
text-align: center;
}
.health-empty-text {
display: block;
font-size: 28px;
color: $tx2;
margin-bottom: 8px;
}
.health-empty-action {
/* ─── 区域 5快捷操作 ─── */
.action-section {
display: flex;
justify-content: center;
padding: 24px 0 0;
}
.health-empty-btn {
background: $pri;
border-radius: $r;
padding: 16px 40px;
}
.health-empty-btn-text {
color: #fff;
font-size: 26px;
font-weight: 500;
}
/* ─── 健康资讯 ─── */
.articles-section {
gap: 16px;
margin: 0 24px 24px;
}
.article-card {
background: $card;
border-radius: $r;
padding: 24px;
margin-bottom: 16px;
box-shadow: $shadow-sm;
&:active {
opacity: 0.7;
}
}
.article-card-title {
font-size: 28px;
color: $tx;
display: block;
font-weight: 500;
margin-bottom: 8px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.article-card-meta {
font-size: 22px;
color: $tx3;
}
/* ─── 设备快捷入口 ─── */
.device-section {
margin: 0 24px 24px;
}
.device-entry {
display: flex;
align-items: center;
background: $card;
border-radius: $r;
padding: 20px 24px;
margin-bottom: 12px;
box-shadow: $shadow-sm;
&:active {
opacity: 0.7;
}
}
.device-entry-icon-wrap {
width: 64px;
height: 64px;
border-radius: $r;
background: $pri-l;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20px;
flex-shrink: 0;
}
.device-entry-icon-text {
font-size: 32px;
}
.device-entry-info {
.action-btn {
flex: 1;
min-width: 0;
}
.device-entry-name {
@include touch-target;
height: $btn-primary-h;
border-radius: $r;
font-size: 28px;
font-weight: 600;
color: $tx;
display: block;
margin-bottom: 4px;
&:active {
opacity: 0.85;
}
}
.device-entry-desc {
font-size: 22px;
color: $tx3;
display: block;
.action-primary {
background: $pri;
color: #fff;
}
.device-entry-arrow {
font-size: 32px;
color: $tx3;
flex-shrink: 0;
.action-outline {
background: transparent;
color: $pri;
border: 2px solid $pri;
}
.action-btn-text {
font-size: 28px;
font-weight: 600;
}