fix(miniprogram): 关怀模式非线性放大重构 + 3 页面接入
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

- elder-mode.scss: 等比×1.3改为非线性放大(标题×1.15/正文×1.35/辅助×1.55)
- 体征网格从2列改为1列,解决放大后溢出问题
- 行高从1.5提升到1.7,对比度$tx3→$tx2增强可读性
- 健康页/消息页/咨询页接入useUIStore关怀模式
- 共享组件(EmptyState/ErrorState/Loading/StepIndicator)适配关怀模式
- 触控区域统一提升到56px+

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
iven
2026-05-09 22:05:06 +08:00
parent 66329852b8
commit 4335f7e144
5 changed files with 598 additions and 114 deletions

View File

@@ -1,173 +1,445 @@
// 长辈模式 CSS 覆写
// 字号 ×1.3 / 间距 ×1.2 / 按钮 48→60px
// 通过页面根 View 添加 .elder-mode class 激活
// 关怀模式 CSS 覆写Phase 1 非线性放大策略)
// 策略:标题 ×1.15 / 正文 ×1.35 / 辅助 ×1.55 / 间距 ×1.4
// 布局:体征网格 1 列 / 行高 1.7 / 触控 56px+ / 对比度增强
.elder-mode {
font-size: 36px; // 28 × 1.3
font-size: 34px; // 28 × 1.2根字号适度放大
line-height: 1.7; // 从 1.5 提升到 1.7
// ─── 全局触控放大 ───
.vital-card,
.checkin-card,
.reminder-item,
.menu-item,
.action-btn {
min-height: 60px;
.session-card,
.consult-card,
.notify-card,
.msg-segment-tab,
.vital-tab,
.period-btn,
.device-card,
.article-entry {
min-height: 56px;
}
.action-btn {
height: 64px;
.action-btn,
.save-btn,
.consultation-create-btn,
.guest-login-btn {
height: 60px;
}
.action-btn-text {
font-size: 22px; // 17 × 1.3
.action-btn-text,
.save-btn-text,
.consultation-create-btn-text {
font-size: 21px; // 17 × 1.24
}
// ─── 首页 ───
// ─── 对比度增强($tx3 → $tx2 等效) ───
.greeting-date,
.vital-unit,
.reminder-count,
.reminder-arrow,
.reminder-tag,
.capsule.capsule-pending,
.vital-tag.tag-empty,
.input-label,
.input-ref,
.trend-bar-label,
.device-arrow,
.session-time,
.consult-time,
.notify-time,
.msg-segment-text,
.msg-segment-badge-text,
.consultation-subtitle,
.empty-hint,
.msg-empty-text,
.trend-empty-text,
.guest-empty-text,
.guest-article-summary,
.session-tag,
.consult-badge-text,
.session-badge-text {
color: #5A554F; // $tx2 覆盖 $tx3提升对比度
}
// ═══════════════════════════════════════
// 首页(标题 ×1.15 / 正文 ×1.35 / 辅助 ×1.55
// ═══════════════════════════════════════
.greeting-text {
font-size: 34px; // 26 × 1.3
font-size: 30px; // 26 × 1.15 标题微增
}
.section-title {
font-size: 30px; // 26 × 1.15
}
.checkin-title {
font-size: 21px; // 16 × 1.3
font-size: 22px; // 16 × 1.35 正文显增
}
.vital-label {
font-size: 17px; // 13 × 1.3
font-size: 18px; // 13 × 1.38
}
.vital-value {
font-size: 39px; // 30 × 1.3
font-size: 34px; // 30 × 1.13数值型标题适度放大
}
.vital-tag {
font-size: 14px; // 11 × 1.3
font-size: 17px; // 11 × 1.55 辅助强增
padding: 3px 10px;
}
.capsule {
font-size: 14px; // 11 × 1.3
font-size: 17px; // 11 × 1.55
padding: 4px 10px;
}
.reminder-title {
font-size: 20px; // 15 × 1.3
font-size: 21px; // 15 × 1.4
}
.reminder-text {
font-size: 17px; // 13 × 1.3
font-size: 18px; // 13 × 1.38
}
.section-title {
font-size: 34px; // 26 × 1.3
// 体征网格2 列 → 1 列(解决溢出核心改动)
.vitals-grid {
grid-template-columns: 1fr;
gap: 14px;
}
// ─── 个人页 ───
// ═══════════════════════════════════════
// 个人页
// ═══════════════════════════════════════
.profile-name {
font-size: 29px; // 22 × 1.3
font-size: 26px; // 22 × 1.18 标题微增
}
.stat-value {
font-size: 36px; // 28 × 1.3
font-size: 34px; // 28 × 1.21
}
.stat-label {
font-size: 17px; // 13 × 1.3
font-size: 18px; // 13 × 1.38
}
.menu-group-title {
font-size: 18px; // 14 × 1.3
font-size: 20px; // 14 × 1.43
}
.menu-label {
font-size: 20px; // 15 × 1.3
font-size: 21px; // 15 × 1.4
}
.menu-icon {
width: 44px;
height: 44px;
width: 48px;
height: 48px;
border-radius: 14px;
}
.menu-icon-text {
font-size: 21px; // 16 × 1.3
font-size: 22px; // 16 × 1.38
}
.logout-text {
font-size: 18px; // 14 × 1.3
font-size: 20px; // 14 × 1.43
}
// ─── 访客首页 ───
// ═══════════════════════════════════════
// 健康页
// ═══════════════════════════════════════
.health-title {
font-size: 30px; // 26 × 1.15
}
.vital-tab-text,
.period-btn-text {
font-size: 20px; // 15 × 1.33
}
.input-field {
height: 64px;
font-size: 34px; // 28 × 1.21
}
.input-label,
.input-ref {
font-size: 18px; // 13 × 1.38
}
.device-name,
.article-entry-text {
font-size: 20px; // 15 × 1.33
}
.device-desc {
font-size: 18px; // 13 × 1.38
}
.ai-card-title {
font-size: 19px; // 14 × 1.36
}
.ai-suggestion-text {
font-size: 18px; // 13 × 1.38
line-height: 1.7;
}
.trend-bar-label {
font-size: 15px; // 11 × 1.36
}
// ═══════════════════════════════════════
// 消息页
// ═══════════════════════════════════════
.messages-title {
font-size: 30px; // 26 × 1.15
}
.consult-doctor,
.notify-title {
font-size: 20px; // 15 × 1.33
}
.consult-preview,
.notify-desc,
.session-message {
font-size: 18px; // 13 × 1.38
line-height: 1.7;
}
.consult-avatar-char {
font-size: 22px; // 18 × 1.22
}
.consult-badge-text,
.session-badge-text,
.msg-segment-badge-text {
font-size: 14px; // 10-11 × 1.3+
}
.msg-segment-badge {
min-width: 20px;
height: 20px;
}
.notify-icon-char {
font-size: 20px; // 16 × 1.25
}
// ═══════════════════════════════════════
// 咨询页
// ═══════════════════════════════════════
.consultation-subtitle {
font-size: 19px; // 14 × 1.36
}
.empty-char {
font-size: 40px; // 32 × 1.25
}
.empty-title {
font-size: 22px; // 16 × 1.38
}
.session-subject {
font-size: 20px; // 15 × 1.33
}
.session-avatar-char {
font-size: 20px; // 16 × 1.25
}
.session-tag {
font-size: 14px; // 10 × 1.4
padding: 3px 8px;
}
.session-badge {
min-width: 22px;
height: 22px;
}
// ═══════════════════════════════════════
// 访客首页
// ═══════════════════════════════════════
.guest-slide-title {
font-size: 34px; // 26 × 1.3
font-size: 30px; // 26 × 1.15
}
.guest-slide-desc {
font-size: 21px; // 16 × 1.3
font-size: 22px; // 16 × 1.38
}
.guest-article-title {
font-size: 21px; // 16 × 1.3
}
.guest-article-summary {
font-size: 17px; // 13 × 1.3
font-size: 22px; // 16 × 1.38
}
.guest-login-btn {
height: 72px; // 56 × 1.3
height: 64px;
font-size: 26px; // 20 × 1.3
}
.guest-login-text {
font-size: 18px; // 13 × 1.38
}
.guest-institution-name {
font-size: 21px; // 16 × 1.3
font-size: 22px; // 16 × 1.38
}
.guest-institution-desc {
font-size: 17px; // 13 × 1.3
font-size: 18px; // 13 × 1.38
}
// ─── 登录页 ───
// ═══════════════════════════════════════
// 登录页
// ═══════════════════════════════════════
.login-title {
font-size: 62px; // 48 × 1.3
font-size: 56px; // 48 × 1.17 标题微增
}
.login-subtitle {
font-size: 34px; // 26 × 1.3
font-size: 30px; // 26 × 1.15
}
.login-btn {
height: 108px; // 96 × 1.13
font-size: 36px; // 32 × 1.13
height: 96px;
font-size: 34px; // 32 × 1.06
}
.skip-btn {
font-size: 26px; // 20 × 1.3
height: 64px;
font-size: 24px; // 20 × 1.2
height: 60px;
}
// ─── 间距放大 ×1.2 ───
// ═══════════════════════════════════════
// 间距放大 ×1.4(大于字号放大倍率,增加呼吸空间)
// ═══════════════════════════════════════
.vitals-grid {
gap: 14px;
}
.checkin-card {
padding: 24px;
padding: 28px;
}
.reminder-card {
padding: 22px;
padding: 24px;
}
.home-page,
.guest-page {
padding: 24px 28px 120px;
.guest-page,
.health-page,
.messages-page,
.consultation-body {
padding: 28px 32px 120px;
}
.profile-page {
padding: 24px 28px 120px;
padding: 28px 32px 120px;
}
.menu-item {
padding: 17px 18px;
padding: 18px 22px;
}
.session-list,
.msg-list {
gap: 12px;
}
.session-card,
.consult-card,
.notify-card {
padding: 20px;
}
.vital-tabs,
.period-group {
gap: 10px;
}
// ═══════════════════════════════════════
// 共享组件
// ═══════════════════════════════════════
// EmptyState
.empty-state-icon-char {
font-size: 56px; // 48 × 1.17
color: #5A554F; // $tx2
}
.empty-state-text {
font-size: 34px; // 30 × 1.13
}
.empty-state-hint {
font-size: 28px; // 24 × 1.17
color: #5A554F; // $tx2
}
.empty-state-action {
padding: 20px 56px;
}
.empty-state-action-text {
font-size: 32px; // 28 × 1.14
}
// ErrorState
.error-state-icon {
font-size: 96px; // 80 × 1.2
}
.error-state-text {
font-size: 32px; // 28 × 1.14
}
.error-state-retry {
padding: 20px 56px;
}
.error-state-retry-text {
font-size: 32px; // 28 × 1.14
}
// Loading
.loading-spinner {
width: 56px;
height: 56px;
}
.loading-state-text {
font-size: 30px; // 26 × 1.15
color: #5A554F; // $tx2
}
// StepIndicator
.step-dot {
width: 56px;
height: 56px;
font-size: 28px; // 24 × 1.17
}
.step-label {
font-size: 26px; // 22 × 1.18
color: #5A554F; // $tx2
}
.step-line {
height: 4px;
top: 28px;
}
}