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

@@ -245,7 +245,7 @@
}
.dm-field-warning-low {
color: #0284C7;
color: $tx2;
}
/* ── submit ── */

View File

@@ -3,6 +3,8 @@ import { View, Text } from '@tarojs/components';
import { useRouter } from '@tarojs/taro';
import { useHealthStore } from '@/stores/health';
import TrendChart from '@/components/TrendChart';
import Loading from '@/components/Loading';
import EmptyState from '@/components/EmptyState';
import { useElderClass } from '../../../hooks/useElderClass';
import './index.scss';
@@ -28,10 +30,15 @@ export default function Trend() {
const indicator = router.params.indicator || 'heart_rate';
const [range, setRange] = useState('7d');
const [points, setPoints] = useState<{ date: string; value: number }[]>([]);
const [loading, setLoading] = useState(true);
const { getTrend } = useHealthStore();
useEffect(() => {
getTrend(indicator, range).then(setPoints);
setLoading(true);
getTrend(indicator, range)
.then(setPoints)
.catch(() => setPoints([]))
.finally(() => setLoading(false));
}, [indicator, range]);
const meta = INDICATOR_META[indicator] || { label: indicator, unit: '' };
@@ -68,17 +75,27 @@ export default function Trend() {
</View>
{/* ECharts 折线图 */}
<View className='trend-chart-card'>
<TrendChart
data={points}
referenceMin={meta.refMin}
referenceMax={meta.refMax}
unit={meta.unit}
/>
</View>
{loading ? (
<View className='trend-chart-card'>
<Loading />
</View>
) : points.length === 0 ? (
<View className='trend-chart-card'>
<EmptyState text='暂无趋势数据' />
</View>
) : (
<View className='trend-chart-card'>
<TrendChart
data={points}
referenceMin={meta.refMin}
referenceMax={meta.refMax}
unit={meta.unit}
/>
</View>
)}
{/* 参考区间 */}
{meta.refMin !== undefined && meta.refMax !== undefined && (
{!loading && points.length > 0 && meta.refMin !== undefined && meta.refMax !== undefined && (
<View className='trend-ref-card'>
<Text className='trend-ref-label'></Text>
<Text className='trend-ref-value'>