Files
hms/apps/miniprogram/src/pages/mall/index.scss
iven 3fb5a77ac0 refactor(mp): 统一空状态为 EmptyState 组件 + 清理旧 Tab CSS
- 4 个页面的内联空状态替换为共享 EmptyState 组件
  (messages / action-inbox / pkg-health/alerts / mall)
- 清理 10 个页面的旧 Tab CSS(迁移到 SegmentTabs 后不再需要)
- 清理 elder-mode 中已删除的 mall-empty-state 引用
2026-05-15 23:11:34 +08:00

210 lines
3.5 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);
}
}