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
265 lines
4.4 KiB
SCSS
265 lines
4.4 KiB
SCSS
@import '../../styles/variables.scss';
|
|
@import '../../styles/mixins.scss';
|
|
|
|
.mall-page {
|
|
min-height: 100vh;
|
|
background: $bg;
|
|
padding-bottom: calc(120px + env(safe-area-inset-bottom));
|
|
}
|
|
|
|
/* ─── 积分余额卡片 ─── */
|
|
.mall-header {
|
|
background: linear-gradient(135deg, $pri 0%, $pri-d 100%);
|
|
padding: 48px 32px 36px;
|
|
}
|
|
|
|
.points-card {
|
|
background: rgba(255, 255, 255, 0.15);
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
border-radius: $r-lg;
|
|
padding: 32px;
|
|
}
|
|
|
|
.points-top {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.points-label {
|
|
font-size: var(--tk-font-h1);
|
|
color: rgba(255, 255, 255, 0.85);
|
|
}
|
|
|
|
.checkin-btn {
|
|
background: rgba(255, 255, 255, 0.25);
|
|
border: 1px solid rgba(255, 255, 255, 0.4);
|
|
padding: 10px 28px;
|
|
border-radius: $r-pill;
|
|
transition: all 0.2s;
|
|
|
|
&:active {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
&.checked {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border-color: rgba(255, 255, 255, 0.2);
|
|
}
|
|
}
|
|
|
|
.checkin-btn-text {
|
|
font-size: var(--tk-font-h2);
|
|
color: $white;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.checkin-btn.checked .checkin-btn-text {
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.points-balance {
|
|
@include serif-number;
|
|
font-size: var(--tk-font-display);
|
|
font-weight: bold;
|
|
color: $white;
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
letter-spacing: 2px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.points-streak {
|
|
font-size: var(--tk-font-body);
|
|
color: rgba(255, 255, 255, 0.7);
|
|
display: block;
|
|
}
|
|
|
|
/* ─── 商品类型切换 ─── */
|
|
.type-tabs {
|
|
display: flex;
|
|
padding: 20px 24px 0;
|
|
}
|
|
|
|
.type-tab {
|
|
flex: 1;
|
|
text-align: center;
|
|
padding: 16px 0;
|
|
position: relative;
|
|
min-height: 48px;
|
|
|
|
&.active::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 48px;
|
|
height: 4px;
|
|
background: $pri;
|
|
border-radius: $r-xs;
|
|
}
|
|
}
|
|
|
|
.type-tab-text {
|
|
font-size: var(--tk-font-body-lg);
|
|
color: $tx2;
|
|
|
|
&.active {
|
|
color: $pri;
|
|
font-weight: 600;
|
|
}
|
|
}
|
|
|
|
/* ─── 商品网格 ─── */
|
|
.product-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 16px;
|
|
padding: 20px 24px;
|
|
}
|
|
|
|
.product-card {
|
|
background: $card;
|
|
border-radius: $r;
|
|
overflow: hidden;
|
|
box-shadow: $shadow-sm;
|
|
|
|
&:active {
|
|
opacity: 0.7;
|
|
}
|
|
}
|
|
|
|
.product-image {
|
|
width: 100%;
|
|
height: 200px;
|
|
@include flex-center;
|
|
|
|
&.type-physical { background: $pri-l; }
|
|
&.type-service { background: $acc-l; }
|
|
&.type-privilege { background: $wrn-l; }
|
|
}
|
|
|
|
.product-image-char {
|
|
font-family: 'Georgia', 'Times New Roman', serif;
|
|
font-size: var(--tk-font-hero);
|
|
font-weight: bold;
|
|
color: $pri;
|
|
line-height: 1;
|
|
|
|
.type-service & { color: $acc; }
|
|
.type-privilege & { color: $wrn; }
|
|
}
|
|
|
|
.product-info {
|
|
padding: 20px;
|
|
}
|
|
|
|
.product-name {
|
|
font-size: var(--tk-font-h1);
|
|
font-weight: 600;
|
|
color: $tx;
|
|
display: block;
|
|
margin-bottom: 12px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.product-bottom {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.product-points {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.product-points-char {
|
|
font-family: 'Georgia', 'Times New Roman', serif;
|
|
font-size: var(--tk-font-body);
|
|
font-weight: bold;
|
|
color: $wrn;
|
|
}
|
|
|
|
.product-points-value {
|
|
@include serif-number;
|
|
font-size: var(--tk-font-body-lg);
|
|
font-weight: bold;
|
|
color: $wrn;
|
|
}
|
|
|
|
.product-stock {
|
|
font-size: var(--tk-font-body);
|
|
padding: 2px 10px;
|
|
border-radius: $r-sm;
|
|
|
|
&.out {
|
|
@include tag($bd-l, $tx3);
|
|
}
|
|
|
|
&.low {
|
|
@include tag($dan-l, $dan);
|
|
}
|
|
}
|
|
|
|
/* ─── 空状态 ─── */
|
|
.mall-empty-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 100px 40px;
|
|
}
|
|
|
|
.empty-icon {
|
|
width: 120px;
|
|
height: 120px;
|
|
border-radius: 50%;
|
|
background: $pri-l;
|
|
@include flex-center;
|
|
margin-bottom: 32px;
|
|
}
|
|
|
|
.empty-char {
|
|
font-family: 'Georgia', 'Times New Roman', serif;
|
|
font-size: var(--tk-font-hero);
|
|
font-weight: bold;
|
|
color: $pri;
|
|
line-height: 1;
|
|
}
|
|
|
|
.empty-title {
|
|
font-size: var(--tk-font-body-lg);
|
|
font-weight: 600;
|
|
color: $tx;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.empty-hint {
|
|
font-size: var(--tk-font-h1);
|
|
color: var(--tk-text-secondary);
|
|
text-align: center;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.empty-action {
|
|
background: $pri;
|
|
border-radius: $r;
|
|
padding: 16px 48px;
|
|
|
|
&:active {
|
|
opacity: 0.85;
|
|
}
|
|
}
|
|
|
|
.empty-action-text {
|
|
font-size: var(--tk-font-body-lg);
|
|
color: $white;
|
|
font-weight: 600;
|
|
}
|