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

@@ -78,7 +78,7 @@
.msg-avatar {
width: 32px;
height: 32px;
border-radius: 16px;
border-radius: $r;
background: $pri-l;
@include flex-center;
flex-shrink: 0;
@@ -116,7 +116,7 @@
word-break: break-all;
.msg-bubble--self & {
color: #fff;
color: $white;
}
}
@@ -178,7 +178,7 @@
height: 40px;
background: $bg;
border: 1.5px solid $bd;
border-radius: 20px;
border-radius: $r-lg;
padding: 0 14px;
font-size: var(--tk-font-cap);
color: $tx;
@@ -187,7 +187,7 @@
.chat-send-btn {
width: 40px;
height: 40px;
border-radius: 20px;
border-radius: $r-lg;
background: $pri;
@include flex-center;
flex-shrink: 0;
@@ -200,7 +200,7 @@
.chat-send-btn__icon {
font-size: var(--tk-font-cap);
color: #fff;
color: $white;
font-weight: 600;
}

View File

@@ -35,7 +35,7 @@
.consultation-create-btn-text {
font-size: var(--tk-font-body-sm);
font-weight: 600;
color: #fff;
color: $white;
}
/* ─── 居中容器 ─── */
@@ -206,6 +206,6 @@
.session-badge-text {
font-size: var(--tk-font-micro);
color: #fff;
color: $white;
font-weight: 600;
}

View File

@@ -1,8 +1,10 @@
import { useState, useRef } from 'react';
import { View, Text } from '@tarojs/components';
import Taro, { useDidShow, usePullDownRefresh, useReachBottom } from '@tarojs/taro';
import { useAuthStore } from '@/stores/auth';
import { listConsultations, ConsultationSession } from '@/services/consultation';
import Loading from '../../components/Loading';
import GuestGuard from '../../components/GuestGuard';
import { useElderClass } from '../../hooks/useElderClass';
import './index.scss';
@@ -31,6 +33,7 @@ function formatTime(iso: string): string {
}
export default function Consultation() {
const user = useAuthStore((s) => s.user);
const [sessions, setSessions] = useState<ConsultationSession[]>([]);
const [loading, setLoading] = useState(true);
const [error, setError] = useState('');
@@ -67,6 +70,7 @@ export default function Consultation() {
useDidShow(() => {
Taro.setNavigationBarTitle({ title: '在线咨询' });
if (!user) return;
loadSessions(1, true);
});
@@ -88,6 +92,9 @@ export default function Consultation() {
return (
<View className={`consultation-page ${modeClass}`}>
{!user ? (
<GuestGuard title='请先登录' desc='登录后即可与医生在线交流' />
) : (
<View className='consultation-body'>
{/* 副标题 */}
<Text className='consultation-subtitle'></Text>
@@ -165,6 +172,7 @@ export default function Consultation() {
</View>
)}
</View>
)}
</View>
);
}