Files
hms/apps/miniprogram/src/pages/pkg-mall/detail/index.scss
iven a8d7183d7c 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
2026-05-14 09:38:02 +08:00

221 lines
3.2 KiB
SCSS

@import '../../../styles/variables.scss';
@import '../../../styles/mixins.scss';
.detail-page {
min-height: 100vh;
background: $bg;
padding-bottom: 40px;
}
/* ===== 余额卡片 ===== */
.balance-card {
background: $card;
margin: 20px 24px 16px;
border-radius: $r-lg;
padding: 32px;
box-shadow: $shadow-sm;
}
.balance-label {
font-size: var(--tk-font-h2);
color: $tx2;
display: block;
margin-bottom: 8px;
}
.balance-value {
@include serif-number;
font-size: var(--tk-font-hero);
font-weight: bold;
color: $pri;
display: block;
margin-bottom: 28px;
letter-spacing: -1px;
}
.balance-stats {
display: flex;
align-items: center;
background: $bg;
border-radius: $r;
padding: 20px 0;
}
.stat-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
}
.stat-value {
@include serif-number;
font-size: var(--tk-font-num);
font-weight: bold;
margin-bottom: 4px;
&.stat-earn {
color: $acc;
}
&.stat-spend {
color: $wrn;
}
&.stat-expired {
color: $tx3;
}
}
.stat-label {
font-size: var(--tk-font-body);
color: $tx3;
}
.stat-divider {
width: 1px;
height: 48px;
background: $bd;
}
/* ===== 类型筛选标签 ===== */
.type-tabs {
display: flex;
gap: 0;
padding: 0 24px;
margin-bottom: 16px;
}
.type-tab {
@include flex-center;
flex: 1;
padding: 16px 0;
position: relative;
&.active::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 40px;
height: 4px;
background: $pri;
border-radius: $r-xs;
}
}
.type-tab-text {
font-size: var(--tk-font-body-lg);
color: $tx3;
.type-tab.active & {
color: $pri;
font-weight: bold;
}
}
/* ===== 交易列表 ===== */
.transaction-list {
padding: 0 24px;
}
.transaction-item {
display: flex;
align-items: center;
background: $card;
border-radius: $r;
padding: 24px;
margin-bottom: 12px;
box-shadow: $shadow-sm;
}
.tx-badge {
width: 64px;
height: 64px;
border-radius: $r;
@include flex-center;
margin-right: 20px;
flex-shrink: 0;
&.tx-badge-earn {
background: $acc-l;
}
&.tx-badge-spend {
background: $wrn-l;
}
&.tx-badge-expired {
background: $bd-l;
}
}
.tx-badge-text {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-body-lg);
font-weight: bold;
.tx-badge-earn & {
color: $acc;
}
.tx-badge-spend & {
color: $wrn;
}
.tx-badge-expired & {
color: $tx3;
}
}
.tx-info {
flex: 1;
min-width: 0;
}
.tx-desc {
font-size: var(--tk-font-body-lg);
color: $tx;
display: block;
margin-bottom: 4px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tx-date {
font-size: var(--tk-font-body);
color: $tx3;
display: block;
}
.tx-amount-col {
display: flex;
flex-direction: column;
align-items: flex-end;
margin-left: 16px;
flex-shrink: 0;
}
.tx-amount {
@include serif-number;
font-size: var(--tk-font-num);
font-weight: bold;
margin-bottom: 4px;
&.tx-amount-positive {
color: $acc;
}
&.tx-amount-negative {
color: $tx2;
}
}
.tx-remaining {
@include serif-number;
font-size: var(--tk-font-body);
color: $tx3;
}