fix(mp): T40 UI 审计修复 — 28 项设计系统合规 + MCP forceSetAuth bridge

T40 小程序 UI 审计全部 60 页面,发现 28 项问题(HIGH×3 MEDIUM×10 LOW×15),
全部修复并通过静态验证(0 硬编码 border-radius/font-size 残留)。

主要修复:
- border-radius: 12 个文件硬编码值 → $r-xs/$r-lg/$r-pill 设计 token
- touch target: 5 个交互元素添加 min-height: 48px(action-inbox/mall/family/medication)
- elder-mode 页面接入 useElderClass(),预览字号改用 var(--tk-font-body)
- consultation 页面增加加载失败 toast 提示
- app.tsx 新增 forceSetAuth bridge 解决 MCP auth 注入兼容问题
- FAB 按钮和开关控件尺寸规范化

审计结果:PASS 41 / PASS_WITH_ISSUES 19 → 修复后全量 PASS
This commit is contained in:
iven
2026-05-14 09:38:02 +08:00
parent 9e0f421c14
commit a8d7183d7c
18 changed files with 295 additions and 690 deletions

View File

@@ -67,7 +67,7 @@
.elder-mode-switch {
width: 52px;
height: 30px;
border-radius: 15px;
border-radius: $r-pill;
background: $bd;
position: relative;
transition: background 0.25s;
@@ -80,7 +80,7 @@
.elder-mode-switch-thumb {
width: 26px;
height: 26px;
border-radius: 13px;
border-radius: $r-pill;
background: $card;
position: absolute;
top: 2px;
@@ -122,7 +122,7 @@
transition: font-size 0.25s;
&--large {
font-size: 21px;
font-size: var(--tk-font-body);
}
}

View File

@@ -1,12 +1,14 @@
import { View, Text } from '@tarojs/components';
import Taro from '@tarojs/taro';
import { useUIStore } from '../../../stores/ui';
import { useElderClass } from '../../../hooks/useElderClass';
import './index.scss';
export default function ElderMode() {
const mode = useUIStore((s) => s.mode);
const setMode = useUIStore((s) => s.setMode);
const isElder = mode === 'elder';
const modeClass = useElderClass();
const handleToggle = () => {
const next = isElder ? 'normal' : 'elder';
@@ -19,7 +21,7 @@ export default function ElderMode() {
};
return (
<View className='elder-mode-page'>
<View className={`elder-mode-page ${modeClass}`}>
<View className='elder-mode-card'>
<View className='elder-mode-header'>
<Text className='elder-mode-icon'></Text>

View File

@@ -100,9 +100,15 @@
.family-edit {
flex-shrink: 0;
margin-left: 16px;
padding: 8px 20px;
padding: 14px 24px;
border: 1px solid $bd;
border-radius: $r-pill;
min-height: 48px;
@include flex-center;
&:active {
background: $bd-l;
}
}
.family-edit-text {

View File

@@ -38,7 +38,7 @@
width: 32px;
height: 4px;
background: $pri;
border-radius: 2px;
border-radius: $r-xs;
}
.task-list {

View File

@@ -89,8 +89,8 @@
}
.toggle {
width: 80px;
height: 44px;
width: 84px;
height: 48px;
border-radius: $r-pill;
padding: 4px;
position: relative;
@@ -106,8 +106,8 @@
}
.toggle-dot {
width: 36px;
height: 36px;
width: 40px;
height: 40px;
border-radius: 50%;
background: $card;
position: absolute;
@@ -126,7 +126,9 @@
.delete-btn {
font-size: var(--tk-font-h2);
color: $dan;
padding: 4px 12px;
padding: 14px 16px;
min-height: 48px;
@include flex-center;
}
.form-card {