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

@@ -117,7 +117,7 @@
.session-avatar {
width: 36px;
height: 36px;
border-radius: 18px;
border-radius: $r-lg;
background: $pri-l;
@include flex-center;
flex-shrink: 0;
@@ -162,7 +162,7 @@
.session-tag {
font-size: var(--tk-font-micro);
padding: 2px 6px;
border-radius: 4px;
border-radius: $r-xs;
font-weight: 500;
display: inline-block;

View File

@@ -62,6 +62,7 @@ export default function Consultation() {
setSessions([]);
setTotal(0);
}
Taro.showToast({ title: '加载失败,下拉重试', icon: 'none' });
} finally {
setLoading(false);
loadingRef.current = false;

View File

@@ -16,6 +16,7 @@
flex: 1;
text-align: center;
padding: 12px 0;
min-height: 48px;
&.active {
.inbox-tab-text {
@@ -31,7 +32,7 @@
right: 30%;
height: 3px;
background: $pri;
border-radius: 2px;
border-radius: $r-xs;
}
}
}

View File

@@ -33,7 +33,7 @@
right: 30%;
height: 4px;
background: $pri;
border-radius: 2px;
border-radius: $r-xs;
}
}
}

View File

@@ -47,7 +47,7 @@
right: 25%;
height: 4px;
background: $pri;
border-radius: 2px;
border-radius: $r-xs;
}
}
}
@@ -174,7 +174,7 @@
bottom: 120px;
width: 96px;
height: 96px;
border-radius: 48px;
border-radius: $r-pill;
background: $pri;
display: flex;
align-items: center;

View File

@@ -35,7 +35,7 @@
right: 20%;
height: 4px;
background: $pri;
border-radius: 2px;
border-radius: $r-xs;
}
}
}

View File

@@ -47,7 +47,7 @@
right: 25%;
height: 4px;
background: $pri;
border-radius: 2px;
border-radius: $r-xs;
}
}
}
@@ -156,7 +156,7 @@
bottom: 120px;
width: 96px;
height: 96px;
border-radius: 48px;
border-radius: $r-pill;
background: $pri;
display: flex;
align-items: center;

View File

@@ -63,7 +63,7 @@
.login-divider-line {
height: 3px;
background: $pri;
border-radius: 2px;
border-radius: $r-xs;
opacity: 0.4;
}

View File

@@ -87,6 +87,7 @@
text-align: center;
padding: 16px 0;
position: relative;
min-height: 48px;
&.active::after {
content: '';
@@ -97,7 +98,7 @@
width: 48px;
height: 4px;
background: $pri;
border-radius: 2px;
border-radius: $r-xs;
}
}

View File

@@ -101,7 +101,7 @@
width: 40px;
height: 4px;
background: $pri;
border-radius: 2px;
border-radius: $r-xs;
}
}

View File

@@ -32,7 +32,7 @@
width: 40px;
height: 4px;
background: $pri;
border-radius: 2px;
border-radius: $r-xs;
}
}

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 {