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

@@ -44,7 +44,7 @@
.sync-btn {
padding: 12rpx 28rpx;
background: $pri;
color: #fff;
color: $white;
border-radius: $r-pill;
font-size: var(--tk-font-micro);
}

View File

@@ -46,5 +46,5 @@
.empty-state-action-text {
font-size: var(--tk-font-body-lg);
color: #fff;
color: $white;
}

View File

@@ -0,0 +1,52 @@
@import '../../styles/variables.scss';
.error-boundary {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 60vh;
padding: 40px 24px;
}
.error-icon-wrap {
width: 64px;
height: 64px;
border-radius: 32px;
background: $pri-l;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20px;
}
.error-icon-text {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-h1);
font-weight: 600;
color: $pri-d;
}
.error-title {
font-size: var(--tk-font-h2);
color: $tx;
margin-bottom: 12px;
font-weight: 600;
}
.error-desc {
font-size: var(--tk-font-body-lg);
color: $tx3;
margin-bottom: 32px;
}
.error-retry-btn {
background: $pri;
border-radius: $r-sm;
padding: 14px 48px;
}
.error-retry-text {
color: $white;
font-size: var(--tk-font-h1);
}

View File

@@ -1,5 +1,6 @@
import React, { Component } from 'react';
import { View, Text } from '@tarojs/components';
import './index.scss';
interface Props {
children: React.ReactNode;
@@ -30,17 +31,17 @@ export default class ErrorBoundary extends Component<Props, State> {
render() {
if (this.state.hasError) {
return (
<View style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', minHeight: '60vh', padding: '40px 24px' }}>
<View style={{ width: '64px', height: '64px', borderRadius: '32px', background: '#F0DDD4', display: 'flex', alignItems: 'center', justifyContent: 'center', marginBottom: '20px' }}>
<Text style={{ fontFamily: 'Georgia, serif', fontSize: '28px', fontWeight: 600, color: '#8B3E1F' }}>!</Text>
<View className='error-boundary'>
<View className='error-icon-wrap'>
<Text className='error-icon-text'>!</Text>
</View>
<Text style={{ fontSize: '32px', color: '#2D2A26', marginBottom: '12px', fontWeight: 600 }}></Text>
<Text style={{ fontSize: '24px', color: '#78716C', marginBottom: '32px' }}></Text>
<Text className='error-title'></Text>
<Text className='error-desc'></Text>
<View
className='error-retry-btn'
onClick={this.handleRetry}
style={{ background: '#C4623A', borderRadius: '12px', padding: '14px 48px' }}
>
<Text style={{ color: '#FFFFFF', fontSize: '28px' }}></Text>
<Text className='error-retry-text'></Text>
</View>
</View>
);

View File

@@ -9,7 +9,7 @@
}
.error-state-icon {
font-size: 80px; /* hero icon — kept as-is */
font-size: var(--tk-font-display);
margin-bottom: 24px;
}
@@ -28,5 +28,5 @@
.error-state-retry-text {
font-size: var(--tk-font-body-lg);
color: #fff;
color: $white;
}

View File

@@ -60,5 +60,5 @@
.guard-btn-text {
font-size: var(--tk-font-body-sm);
font-weight: 600;
color: #fff;
color: $white;
}