feat: 支持秒杀活动
This commit is contained in:
@@ -37,28 +37,10 @@
|
||||
class="card-row"
|
||||
@tap="goToDetail(c.id)"
|
||||
>
|
||||
<!-- Card Cover — horizontal -->
|
||||
<!-- Card Cover — clean minimal -->
|
||||
<view class="card-cover" :class="getCardCoverClass(c.type)">
|
||||
<view class="cover-accent-bar" />
|
||||
<view class="cover-deco cover-deco--tl" />
|
||||
<view class="cover-deco cover-deco--br" />
|
||||
<view class="cover-icon" :class="`cover-icon--${c.type}`" />
|
||||
<view class="cover-content">
|
||||
<view class="cover-badge">
|
||||
<text class="cover-badge-text">{{ getCardTypeLabel(c.type) }}</text>
|
||||
</view>
|
||||
<text class="cover-name">{{ c.name }}</text>
|
||||
<view class="cover-price-row">
|
||||
<text class="cover-currency">¥</text>
|
||||
<text class="cover-price">{{ formatPrice(c.price) }}</text>
|
||||
</view>
|
||||
<text
|
||||
v-if="c.originalPrice && c.originalPrice > c.price"
|
||||
class="cover-original"
|
||||
>
|
||||
¥{{ formatPrice(c.originalPrice) }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="cover-deco cover-deco--1" />
|
||||
<view class="cover-deco cover-deco--2" />
|
||||
</view>
|
||||
|
||||
<!-- Card info — aligns with card-cover height -->
|
||||
@@ -461,15 +443,15 @@ onMounted(() => {
|
||||
overflow: hidden;
|
||||
|
||||
&.hero--times {
|
||||
background: linear-gradient(135deg, #1a1a2e 0%, #2d2d5e 100%);
|
||||
background: linear-gradient(135deg, #E8D5C4 0%, #D4BFA8 100%);
|
||||
}
|
||||
|
||||
&.hero--duration {
|
||||
background: linear-gradient(135deg, #6c3483 0%, #9b59b6 100%);
|
||||
background: linear-gradient(135deg, #D8C8DC 0%, #C4AECB 100%);
|
||||
}
|
||||
|
||||
&.hero--trial {
|
||||
background: linear-gradient(135deg, #5a7a8a 0%, $primary-dark 100%);
|
||||
background: linear-gradient(135deg, #C8D8D2 0%, #A9C4BC 100%);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -477,7 +459,7 @@ onMounted(() => {
|
||||
.hero-deco {
|
||||
position: absolute;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
background: rgba(255, 255, 255, 0.35);
|
||||
pointer-events: none;
|
||||
|
||||
&--1 {
|
||||
@@ -499,14 +481,14 @@ onMounted(() => {
|
||||
align-self: flex-start;
|
||||
padding: 8rpx 22rpx;
|
||||
border-radius: 20rpx;
|
||||
background: rgba(255, 255, 255, 0.18);
|
||||
border: 1rpx solid rgba(255, 255, 255, 0.3);
|
||||
background: rgba(74, 64, 53, 0.1);
|
||||
border: 1rpx solid rgba(74, 64, 53, 0.15);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.hero-badge-text {
|
||||
font-size: 22rpx;
|
||||
color: #fff;
|
||||
color: $brand-color;
|
||||
font-weight: 600;
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
@@ -514,7 +496,7 @@ onMounted(() => {
|
||||
.hero-name {
|
||||
font-size: 48rpx;
|
||||
font-weight: 800;
|
||||
color: #fff;
|
||||
color: $brand-color;
|
||||
letter-spacing: 1rpx;
|
||||
z-index: 1;
|
||||
}
|
||||
@@ -529,20 +511,20 @@ onMounted(() => {
|
||||
.hero-currency {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
color: rgba(74, 64, 53, 0.7);
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.hero-price {
|
||||
font-size: 64rpx;
|
||||
font-weight: 800;
|
||||
color: #fff;
|
||||
color: $brand-color;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.hero-original {
|
||||
font-size: 28rpx;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
color: rgba(74, 64, 53, 0.4);
|
||||
text-decoration: line-through;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
@@ -575,7 +557,7 @@ onMounted(() => {
|
||||
.section-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
color: #1a1a1a;
|
||||
color: $text-primary;
|
||||
}
|
||||
|
||||
/* ── Info grid card ──────────────────────────────────── */
|
||||
@@ -741,239 +723,49 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
/* ══════════════════════════════════════════════════════════
|
||||
CARD COVER — Horizontal premium card design
|
||||
CARD COVER — Clean minimal design
|
||||
══════════════════════════════════════════════════════════ */
|
||||
.card-cover {
|
||||
width: 240rpx;
|
||||
width: 200rpx;
|
||||
height: 130rpx;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
flex-shrink: 0;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -20rpx;
|
||||
left: -20rpx;
|
||||
right: -20rpx;
|
||||
bottom: -20rpx;
|
||||
background: inherit;
|
||||
filter: blur(24rpx) brightness(0.8);
|
||||
z-index: 0;
|
||||
opacity: 0.4;
|
||||
}
|
||||
}
|
||||
|
||||
.cover-accent-bar {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 6rpx;
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.cover-deco {
|
||||
position: absolute;
|
||||
border-radius: 50%;
|
||||
z-index: 0;
|
||||
pointer-events: none;
|
||||
|
||||
&--tl {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
top: -16rpx;
|
||||
right: 20rpx;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
&--1 {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
top: -30rpx;
|
||||
right: -20rpx;
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
&--br {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
bottom: -24rpx;
|
||||
left: -16rpx;
|
||||
background: rgba(255, 255, 255, 0.07);
|
||||
}
|
||||
}
|
||||
|
||||
.cover-icon {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
flex-shrink: 0;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.cover-icon--TIMES {
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 36rpx;
|
||||
height: 24rpx;
|
||||
border: 2rpx solid rgba(255, 255, 255, 0.85);
|
||||
border-radius: 5rpx;
|
||||
box-sizing: border-box;
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
}
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 10rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 36rpx;
|
||||
height: 24rpx;
|
||||
border: 2rpx solid rgba(255, 255, 255, 1);
|
||||
border-radius: 5rpx;
|
||||
box-sizing: border-box;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
.cover-icon--DURATION {
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 36rpx;
|
||||
height: 30rpx;
|
||||
border: 2rpx solid rgba(255, 255, 255, 0.9);
|
||||
border-radius: 5rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 9rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 24rpx;
|
||||
height: 0;
|
||||
border-top: 2rpx solid rgba(255, 255, 255, 1);
|
||||
box-shadow:
|
||||
-6rpx 5rpx 0 0 rgba(255, 255, 255, 0.9),
|
||||
6rpx 5rpx 0 0 rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
}
|
||||
|
||||
.cover-icon--TRIAL {
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
border: 2rpx solid rgba(255, 255, 255, 1);
|
||||
border-radius: 50%;
|
||||
box-sizing: border-box;
|
||||
&--2 {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
bottom: -20rpx;
|
||||
left: -10rpx;
|
||||
background: rgba(255, 255, 255, 0.25);
|
||||
}
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 2rpx;
|
||||
height: 42rpx;
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
box-shadow:
|
||||
0 -12rpx 0 0 rgba(255, 255, 255, 0.8),
|
||||
0 12rpx 0 0 rgba(255, 255, 255, 0.8),
|
||||
-12rpx 0 0 0 rgba(255, 255, 255, 0.8),
|
||||
12rpx 0 0 0 rgba(255, 255, 255, 0.8),
|
||||
-8rpx -8rpx 0 0 rgba(255, 255, 255, 0.8),
|
||||
8rpx -8rpx 0 0 rgba(255, 255, 255, 0.8),
|
||||
-8rpx 8rpx 0 0 rgba(255, 255, 255, 0.8),
|
||||
8rpx 8rpx 0 0 rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
.cover--times {
|
||||
background: linear-gradient(135deg, #1e2340 0%, #2d2d5e 50%, #3a3a7a 100%);
|
||||
background: linear-gradient(135deg, #E8D5C4 0%, #D4BFA8 100%);
|
||||
}
|
||||
|
||||
.cover--duration {
|
||||
background: linear-gradient(135deg, #4a1a6b 0%, #6c3483 50%, #8e4aaf 100%);
|
||||
background: linear-gradient(135deg, #D8C8DC 0%, #C4AECB 100%);
|
||||
}
|
||||
|
||||
.cover--trial {
|
||||
background: linear-gradient(135deg, #14527a 0%, #1a6fa0 50%, #48a9a6 100%);
|
||||
}
|
||||
|
||||
.cover-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
padding: 0 16rpx 0 12rpx;
|
||||
gap: 4rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.cover-badge {
|
||||
padding: 3rpx 10rpx;
|
||||
border-radius: 8rpx;
|
||||
background: rgba(255, 255, 255, 0.18);
|
||||
border: 1rpx solid rgba(255, 255, 255, 0.28);
|
||||
}
|
||||
|
||||
.cover-badge-text {
|
||||
font-size: 16rpx;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.cover-name {
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
letter-spacing: 0.5rpx;
|
||||
line-height: 1.2;
|
||||
max-width: 130rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cover-price-row {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 2rpx;
|
||||
}
|
||||
|
||||
.cover-currency {
|
||||
font-size: 18rpx;
|
||||
font-weight: 600;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
}
|
||||
|
||||
.cover-price {
|
||||
font-size: 28rpx;
|
||||
font-weight: 800;
|
||||
color: #ffffff;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.cover-original {
|
||||
font-size: 16rpx;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
text-decoration: line-through;
|
||||
background: linear-gradient(135deg, #C8D8D2 0%, #A9C4BC 100%);
|
||||
}
|
||||
|
||||
/* ── Card info — matches card-cover height ── */
|
||||
|
||||
Reference in New Issue
Block a user