Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
99a3c713
Commit
99a3c713
authored
Oct 30, 2025
by
jt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
a03176d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
175 additions
and
153 deletions
+175
-153
SeckillSection.less
components/SeckillSection.less
+46
-23
SeckillSection.vue
components/SeckillSection.vue
+129
-130
No files found.
components/SeckillSection.less
View file @
99a3c713
...
...
@@ -4,6 +4,7 @@
display: flex;
flex-direction: column;
align-items: center;
font-family: "PingFang SC";
// 标题区域样式 - 参考会员活动
.credits_sale_area {
...
...
@@ -85,7 +86,7 @@
.tab_item {
text-align: center;
padding:
15
rpx 8rpx;
padding:
20
rpx 8rpx;
position: relative;
cursor: pointer;
color: #503404;
...
...
@@ -107,11 +108,11 @@
// 弧形三角形样式 - 使用base64 SVG背景图
.triangle-left {
position: absolute;
left: -9
9
rpx;
left: -9
2
rpx;
top: 0;
pointer-events: none;
width: 200rpx;
height: 10
2
%;
height: 10
4
%;
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: center;
...
...
@@ -119,11 +120,11 @@
.triangle-right {
position: absolute;
right: -9
9
rpx;
right: -9
2
rpx;
top: 0;
pointer-events: none;
width: 200rpx;
height: 10
2
%;
height: 10
4
%;
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: center;
...
...
@@ -148,7 +149,7 @@
position: relative;
.tab_time_info {
margin-bottom: 1
8
rpx;
margin-bottom: 1
0
rpx;
.tab_time_text {
&.countdown_display {
...
...
@@ -188,11 +189,15 @@
}
.session_status_tag {
margin: 0 !important;
line-height: 1;
&.ongoing {
.status_text {
// 颜色通过内联样式动态设置
font-weight: bold;
font-size: 20rpx;
display: block;
line-height: 1;
}
}
}
...
...
@@ -206,23 +211,30 @@
position: relative;
.tab_time_info {
margin-bottom: 6rpx;
margin-bottom: 10rpx;
padding: 0;
line-height: 1;
.tab_time_text {
&.start_time_text {
font-size: 30rpx;
font-weight: 600;
line-height: 1;
// 颜色通过内联样式动态设置
}
}
}
.session_status_tag {
margin: 0 !important;
line-height: 1;
&.upcoming {
.upcoming_text {
// 颜色通过内联样式动态设置
font-weight: bold;
font-size: 20rpx;
display: block;
line-height: 1;
}
}
...
...
@@ -231,6 +243,8 @@
// 颜色通过内联样式动态设置
font-weight: bold;
font-size: 20rpx;
display: block;
line-height: 1;
}
}
}
...
...
@@ -238,13 +252,16 @@
// 保留原有样式作为备用
.session_status_tag {
margin-bottom: 6rpx;
margin: 0;
padding: 0;
line-height: 1;
&.ongoing {
.status_text {
color: #1C1C1C;
font-weight: bold;
font-size: 20rpx;
line-height: 1;
}
}
...
...
@@ -252,11 +269,15 @@
.countdown_text {
color: #666;
font-size: 18rpx;
line-height: 1;
}
}
}
.tab_time_info {
margin: 0;
padding: 0;
line-height: 1;
.tab_time_text {
font-size: 16rpx;
color: #666;
...
...
@@ -305,7 +326,7 @@
width: 220rpx; // 固定宽度220rpx
height: 380rpx; // 固定高度380rpx
border-radius: 16rpx;
padding: 15rpx;
padding: 15rpx
15rpx 39rpx 15rpx
;
display: flex;
flex-direction: column;
...
...
@@ -362,8 +383,8 @@
.credits_sale_button {
width: 100%;
height:
50
rpx;
border-radius:
25
rpx;
height:
62
rpx;
border-radius:
50
rpx;
color: #fff;
display: flex;
align-items: center;
...
...
@@ -396,6 +417,7 @@
.credits_sale_good_item {
width: 100%;
max-width: 600rpx;
height: 288rpx;
display: flex;
flex-direction: row;
align-items: flex-start;
...
...
@@ -445,7 +467,8 @@
}
.credits_sale_button {
height: 70rpx;
width: 250rpx;
// height: 70rpx;
}
}
}
...
...
@@ -469,24 +492,24 @@
&.ongoing {
.status_text {
// 颜色通过内联样式动态设置
// font-weight: bold
;
font-size:
40
rpx;
font-weight: 400
;
font-size:
28
rpx;
}
}
&.upcoming {
.upcoming_text {
// 颜色通过内联样式动态设置
font-weight:
bold
;
font-size:
40
rpx;
font-weight:
400
;
font-size:
28
rpx;
}
}
&.ended {
.ended_text {
// 颜色通过内联样式动态设置
font-weight:
bold
;
font-size:
40
rpx;
font-weight:
400
;
font-size:
28
rpx;
}
}
}
...
...
@@ -511,8 +534,8 @@
&.countdown_display {
.countdown_label {
color: #B27C1E;
font-size:
36
rpx;
font-weight:
1
00;
font-size:
28
rpx;
font-weight:
4
00;
}
.countdown_numbers {
...
...
@@ -535,8 +558,8 @@
border-radius: 6rpx;
text-align: center;
line-height: 34rpx;
font-size:
18
rpx;
font-weight:
bold
;
font-size:
24
rpx;
font-weight:
400
;
}
.countdown_colon {
...
...
components/SeckillSection.vue
View file @
99a3c713
...
...
@@ -84,9 +84,9 @@
<!-- 场次商品列表 - 根据商品数量动态调整布局 -->
<view
class=
"session_goods_list"
:class=
"getGoodsListClass()"
>
<view
v-for=
"(good, goodIndex) in creditsSaleData.sessions[currentSessionIndex]?.goods || []"
:key=
"goodIndex"
class=
"credits_sale_good_item"
@
click=
"!getGoodButtonInfo(good, creditsSaleData.sessions[currentSessionIndex]).disabled &&
handleCreditsSaleClickThrottled(good)"
>
<view
v-for=
"(good, goodIndex) in creditsSaleData.sessions[currentSessionIndex]?.goods || []"
:key=
"goodIndex"
class=
"credits_sale_good_item"
@
click=
"
handleCreditsSaleClickThrottled(good)"
>
<!-- 商品图片 -->
<view
class=
"good_image_placeholder"
>
<image
v-if=
"good.image"
:src=
"good.image"
mode=
"aspectFill"
class=
"good_image"
/>
...
...
@@ -647,22 +647,22 @@ const generateTestSeckillData = () => {
"priceSale"
:
"200.00"
,
"stock"
:
10
},
//
{
//
"button": {"key": 1, "text": "立即抢购"},
//
"credits": 150,
//
"creditsType": "CREDITS",
//
"creditsTypeName": "积分",
//
"goods": {
//
"id": 102,
//
"goodsName": "测试商品B - 正在进行中",
//
"goodsImage": ["https://via.placeholder.com/150/4CAF50/FFFFFF?text=GoodB"],
//
"credits": "150",
//
"priceSale": "300.00",
//
"stock": 5
//
},
//
"priceSale": "300.00",
//
"stock": 5
//
}
{
"button"
:
{
"key"
:
1
,
"text"
:
"立即抢购"
},
"credits"
:
150
,
"creditsType"
:
"CREDITS"
,
"creditsTypeName"
:
"积分"
,
"goods"
:
{
"id"
:
102
,
"goodsName"
:
"测试商品B - 正在进行中"
,
"goodsImage"
:
[
"https://via.placeholder.com/150/4CAF50/FFFFFF?text=GoodB"
],
"credits"
:
"150"
,
"priceSale"
:
"300.00"
,
"stock"
:
5
},
"priceSale"
:
"300.00"
,
"stock"
:
5
}
],
"sessionKey"
:
"session_1_ongoing"
,
"start"
:
session1Start
...
...
@@ -722,116 +722,116 @@ const generateTestSeckillData = () => {
"sessionKey"
:
"session_2_ongoing"
,
"start"
:
session2Start
},
//
{
//
"end": session3End,
//
"goods": [
//
{
//
"button": {"key": 2, "text": "即将开始"},
//
"credits": 300,
//
"creditsType": "CREDITS",
//
"creditsTypeName": "积分",
//
"goods": {
//
"id": 301,
//
"goodsName": "测试商品D - 即将开始",
//
"goodsImage": ["https://via.placeholder.com/150/9C27B0/FFFFFF?text=GoodD"],
//
"credits": "300",
//
"priceSale": "600.00",
//
"stock": 3
//
},
//
"priceSale": "600.00",
//
"stock": 3
//
},
//
{
//
"button": {"key": 2, "text": "即将开始"},
//
"credits": 250,
//
"creditsType": "CREDITS",
//
"creditsTypeName": "积分",
//
"goods": {
//
"id": 302,
//
"goodsName": "测试商品E - 即将开始",
//
"goodsImage": ["https://via.placeholder.com/150/FF9800/FFFFFF?text=GoodE"],
//
"credits": "250",
//
"priceSale": "500.00",
//
"stock": 6
//
},
//
"priceSale": "500.00",
//
"stock": 6
//
},
//
{
//
"button": {"key": 2, "text": "即将开始"},
//
"credits": 180,
//
"creditsType": "CREDITS",
//
"creditsTypeName": "积分",
//
"goods": {
//
"id": 303,
//
"goodsName": "测试商品F - 即将开始",
//
"goodsImage": ["https://via.placeholder.com/150/795548/FFFFFF?text=GoodF"],
//
"credits": "180",
//
"priceSale": "360.00",
//
"stock": 12
//
},
//
"priceSale": "360.00",
//
"stock": 12
//
}
//
],
//
"sessionKey": "session_3_upcoming",
//
"start": session3Start
//
},
//
{
//
"end": session4End,
//
"goods": [
//
{
//
"button": {"key": 2, "text": "即将开始"},
//
"credits": 300,
//
"creditsType": "CREDITS",
//
"creditsTypeName": "积分",
//
"goods": {
//
"id": 301,
//
"goodsName": "测试商品D - 即将开始",
//
"goodsImage": ["https://via.placeholder.com/150/9C27B0/FFFFFF?text=GoodD"],
//
"credits": "300",
//
"priceSale": "600.00",
//
"stock": 3
//
},
//
"priceSale": "600.00",
//
"stock": 3
//
},
//
{
//
"button": {"key": 2, "text": "即将开始"},
//
"credits": 250,
//
"creditsType": "CREDITS",
//
"creditsTypeName": "积分",
//
"goods": {
//
"id": 302,
//
"goodsName": "测试商品E - 即将开始",
//
"goodsImage": ["https://via.placeholder.com/150/FF9800/FFFFFF?text=GoodE"],
//
"credits": "250",
//
"priceSale": "500.00",
//
"stock": 6
//
},
//
"priceSale": "500.00",
//
"stock": 6
//
},
//
{
//
"button": {"key": 2, "text": "即将开始"},
//
"credits": 180,
//
"creditsType": "CREDITS",
//
"creditsTypeName": "积分",
//
"goods": {
//
"id": 303,
//
"goodsName": "测试商品F - 即将开始",
//
"goodsImage": ["https://via.placeholder.com/150/795548/FFFFFF?text=GoodF"],
//
"credits": "180",
//
"priceSale": "360.00",
//
"stock": 12
//
},
//
"priceSale": "360.00",
//
"stock": 12
//
}
//
],
//
"sessionKey": "session_3_upcoming",
//
"start": session4Start
//
}
{
"end"
:
session3End
,
"goods"
:
[
{
"button"
:
{
"key"
:
2
,
"text"
:
"即将开始"
},
"credits"
:
300
,
"creditsType"
:
"CREDITS"
,
"creditsTypeName"
:
"积分"
,
"goods"
:
{
"id"
:
301
,
"goodsName"
:
"测试商品D - 即将开始"
,
"goodsImage"
:
[
"https://via.placeholder.com/150/9C27B0/FFFFFF?text=GoodD"
],
"credits"
:
"300"
,
"priceSale"
:
"600.00"
,
"stock"
:
3
},
"priceSale"
:
"600.00"
,
"stock"
:
3
},
{
"button"
:
{
"key"
:
2
,
"text"
:
"即将开始"
},
"credits"
:
250
,
"creditsType"
:
"CREDITS"
,
"creditsTypeName"
:
"积分"
,
"goods"
:
{
"id"
:
302
,
"goodsName"
:
"测试商品E - 即将开始"
,
"goodsImage"
:
[
"https://via.placeholder.com/150/FF9800/FFFFFF?text=GoodE"
],
"credits"
:
"250"
,
"priceSale"
:
"500.00"
,
"stock"
:
6
},
"priceSale"
:
"500.00"
,
"stock"
:
6
},
{
"button"
:
{
"key"
:
2
,
"text"
:
"即将开始"
},
"credits"
:
180
,
"creditsType"
:
"CREDITS"
,
"creditsTypeName"
:
"积分"
,
"goods"
:
{
"id"
:
303
,
"goodsName"
:
"测试商品F - 即将开始"
,
"goodsImage"
:
[
"https://via.placeholder.com/150/795548/FFFFFF?text=GoodF"
],
"credits"
:
"180"
,
"priceSale"
:
"360.00"
,
"stock"
:
12
},
"priceSale"
:
"360.00"
,
"stock"
:
12
}
],
"sessionKey"
:
"session_3_upcoming"
,
"start"
:
session3Start
},
{
"end"
:
session4End
,
"goods"
:
[
{
"button"
:
{
"key"
:
2
,
"text"
:
"即将开始"
},
"credits"
:
300
,
"creditsType"
:
"CREDITS"
,
"creditsTypeName"
:
"积分"
,
"goods"
:
{
"id"
:
301
,
"goodsName"
:
"测试商品D - 即将开始"
,
"goodsImage"
:
[
"https://via.placeholder.com/150/9C27B0/FFFFFF?text=GoodD"
],
"credits"
:
"300"
,
"priceSale"
:
"600.00"
,
"stock"
:
3
},
"priceSale"
:
"600.00"
,
"stock"
:
3
},
{
"button"
:
{
"key"
:
2
,
"text"
:
"即将开始"
},
"credits"
:
250
,
"creditsType"
:
"CREDITS"
,
"creditsTypeName"
:
"积分"
,
"goods"
:
{
"id"
:
302
,
"goodsName"
:
"测试商品E - 即将开始"
,
"goodsImage"
:
[
"https://via.placeholder.com/150/FF9800/FFFFFF?text=GoodE"
],
"credits"
:
"250"
,
"priceSale"
:
"500.00"
,
"stock"
:
6
},
"priceSale"
:
"500.00"
,
"stock"
:
6
},
{
"button"
:
{
"key"
:
2
,
"text"
:
"即将开始"
},
"credits"
:
180
,
"creditsType"
:
"CREDITS"
,
"creditsTypeName"
:
"积分"
,
"goods"
:
{
"id"
:
303
,
"goodsName"
:
"测试商品F - 即将开始"
,
"goodsImage"
:
[
"https://via.placeholder.com/150/795548/FFFFFF?text=GoodF"
],
"credits"
:
"180"
,
"priceSale"
:
"360.00"
,
"stock"
:
12
},
"priceSale"
:
"360.00"
,
"stock"
:
12
}
],
"sessionKey"
:
"session_3_upcoming"
,
"start"
:
session4Start
}
],
"id"
:
1141
,
"name"
:
"测试秒杀"
,
...
...
@@ -849,7 +849,6 @@ const loadSeckillData = async () => {
// 使用测试数据
// const testData = generateTestSeckillData();
// mapSeckillDataToCreditsSale(testData);
// // // 初始化倒计时
// initCountdowns();
// 如果需要真实数据,可以取消注释下面的代码
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment