- 首页/健康/我的/商城/消息 TabBar 页面使用 PageShell 替代手写容器 - 登录/法律条款/关怀模式设置页使用 PageShell 替代手写容器 - 各页面卡片统一使用 ContentCard 组件 - 清理页面 SCSS 中的 min-height/background/padding 样板代码 - 66 个小程序页面全部完成统一组件迁移
205 lines
3.4 KiB
SCSS
205 lines
3.4 KiB
SCSS
@import '../../styles/variables.scss';
|
|
@import '../../styles/mixins.scss';
|
|
|
|
.mall-page {
|
|
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 {
|
|
overflow: hidden;
|
|
|
|
&: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);
|
|
}
|
|
}
|
|
|