fix(mp): T40 UI 设计系统合规审计修复 — 60 页面全覆盖

- 新增 $white 语义变量 + --tk-font-display Token
- 44 处 #fff → $white,2 处 background: #fff → $card
- 14 处 border-radius 硬编码统一为 $r-xs/$r-lg/$r
- 3 处 TSX inline 颜色提取为 SCSS 类(exchange/orders/action-inbox)
- ErrorBoundary 重构:6 个 inline style → SCSS 类 + Design Token
- 2 处离调色板颜色修正(#0284C7→$tx2, #94A3B8→$tx3)
- 2 处静默 catch 块添加状态清理(article/health)
- 趋势页补 Loading/EmptyState;咨询页 GuestGuard 统一
- 4 处 #FFFFFF → $white(mixins/index/exchange/variables)
This commit is contained in:
iven
2026-05-13 23:26:00 +08:00
parent 02082ccc61
commit 93c77c5857
49 changed files with 317 additions and 143 deletions

View File

@@ -30,7 +30,7 @@
.vital-tab {
flex: 1;
height: 40px;
border-radius: 12px;
border-radius: $r-sm;
background: $surface-alt;
@include flex-center;
position: relative;
@@ -44,7 +44,7 @@
box-shadow: 0 2px 8px rgba(196, 98, 58, 0.25);
.vital-tab-text {
color: #fff;
color: $white;
}
}
}
@@ -89,7 +89,7 @@
height: 56px;
background: $bg;
border: 2px solid $bd;
border-radius: 12px;
border-radius: $r-sm;
padding: 0 16px;
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-body-lg);
@@ -121,7 +121,7 @@
.period-btn {
flex: 1;
height: 48px;
border-radius: 12px;
border-radius: $r-sm;
background: $surface-alt;
@include flex-center;
@@ -129,7 +129,7 @@
background: $pri;
.period-btn-text {
color: #fff;
color: $white;
}
}
@@ -148,7 +148,7 @@
.save-btn {
width: 100%;
height: 52px;
border-radius: 14px;
border-radius: $r-sm;
background: $pri;
@include flex-center;
margin-top: 20px;
@@ -162,7 +162,7 @@
.save-btn-text {
font-size: var(--tk-font-body-sm);
font-weight: 600;
color: #fff;
color: $white;
}
/* ─── 趋势图 ─── */
@@ -199,7 +199,7 @@
align-items: flex-end;
height: 120px;
background: $bg;
border-radius: 12px;
border-radius: $r-sm;
padding: 12px 8px;
gap: 0;
position: relative;
@@ -234,7 +234,7 @@
.trend-bar {
width: 28px;
border-radius: 6px 6px 0 0;
border-radius: $r-xs $r-xs 0 0;
min-height: 8px;
opacity: 0.8;
@@ -275,7 +275,7 @@
.device-icon {
width: 44px;
height: 44px;
border-radius: 12px;
border-radius: $r-sm;
background: $pri-l;
@include flex-center;
flex-shrink: 0;
@@ -368,6 +368,18 @@
height: 8px;
border-radius: 50%;
flex-shrink: 0;
&.ai-risk-high {
background: $dan;
}
&.ai-risk-medium {
background: $wrn;
}
&.ai-risk-low {
background: $acc;
}
}
.ai-suggestion-text {

View File

@@ -81,7 +81,7 @@ export default function Health() {
const items = await listPendingSuggestions();
setAiSuggestions(items.slice(0, 3));
} catch {
// 静默
setAiSuggestions([]);
}
};
@@ -236,13 +236,13 @@ export default function Health() {
<Text className='ai-card-count'>{aiSuggestions.length} </Text>
</View>
{aiSuggestions.map((s) => {
const riskColor = s.risk_level === 'high' ? '#ef4444' : s.risk_level === 'medium' ? '#f59e0b' : '#22c55e';
const riskCls = s.risk_level === 'high' ? 'ai-risk-high' : s.risk_level === 'medium' ? 'ai-risk-medium' : 'ai-risk-low';
const typeLabel = s.suggestion_type === 'followup' ? '随访' : s.suggestion_type === 'appointment' ? '预约' : '预警';
const params = s.params as Record<string, unknown> | null;
const reason = (params?.reason as string) || (params?.message as string) || typeLabel;
return (
<View key={s.id} className='ai-suggestion-item'>
<View className='ai-risk-dot' style={{ background: riskColor }} />
<View className={`ai-risk-dot ${riskCls}`} />
<Text className='ai-suggestion-text'>{reason.slice(0, 40)}</Text>
</View>
);