Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
7d4166db
Commit
7d4166db
authored
Feb 06, 2024
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
秒杀
parent
d0bd56ec
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
static/nativeComponents/GoodsList/GoodsItem/index.js
+12
-1
static/nativeComponents/GoodsList/GoodsItem/index.wxml
+1
-1
No files found.
static/nativeComponents/GoodsList/GoodsItem/index.js
View file @
7d4166db
...
...
@@ -100,6 +100,7 @@ const componentOptions = {
tempObj
.
originPrice
=
Number
(
item
.
salePrice
).
toFixed
(
2
);
tempObj
.
formatTime
=
this
.
formatDate
(
tempObj
.
startTime
);
this
.
setData
({
currentSecKillInfo
:
tempObj
})
console
.
log
(
'currentSecKillInfo'
,
this
.
data
.
currentSecKillInfo
);
const
timestamp
=
new
Date
(
this
.
data
.
currentSecKillInfo
.
startTime
)
-
Date
.
now
()
if
(
timestamp
>
0
)
{
this
.
setData
({
isBeginSecKill
:
false
});
...
...
@@ -188,6 +189,10 @@ const componentOptions = {
this
.
setData
({
timeData
:
e
.
detail
});
},
onclickProduct
(
e
)
{
// 测试用↓
// this.onclickBuynow(e);
// return;
// 测试用↑
let
{
goodsType
}
=
this
.
data
.
datas
.
componentData
;
let
{
shopName
,
...
...
@@ -276,8 +281,14 @@ const componentOptions = {
}
else
{
// 进入确认订单
linkVal
=
`/order/orderConfirm?productGoodsMixId=
${
minProductGoodsMixid
}
&productGoodsId=
${
minProductGoodsId
}
&goodsId=
${
minGoodsId
}
&qty=1&goodsString=null&source=3`
;
//! 活动商品url加相关参数
// 秒杀(isSecKill是否秒杀活动,secKillId秒杀活动id,secKillGoodsId秒杀活动商品id)
console
.
log
(
'currentSecKillInfo'
,
this
.
data
.
currentSecKillInfo
);
if
(
this
.
data
.
currentSecKillInfo
&&
this
.
data
.
currentSecKillInfo
.
activityStatus
==
1
)
{
linkVal
+=
`&isSecKill=true&secKillId=
${
this
.
data
.
currentSecKillInfo
.
id
}
&secKillGoodsId=
${
this
.
data
.
currentSecKillInfo
.
goodsId
}
`
;
}
console
.
log
(
'linkVal'
,
linkVal
);
}
console
.
log
(
linkVal
,
"-------90"
);
app
.
trackCpn
(
e
,
this
.
data
.
datas
.
componentName
,
{
shopName
,
minGoodsId
,
productName
,
minProductGoodsId
,
minProductGoodsMixid
})
...
...
static/nativeComponents/GoodsList/GoodsItem/index.wxml
View file @
7d4166db
...
...
@@ -39,7 +39,7 @@
bind:finish="handleSecFinish"
bind:change="onSecRestTimeChange"
>
<view style="color: #fff;font-size:
24
rpx;">
<view style="color: #fff;font-size:
18rpx;line-height: 28
rpx;">
距结束还剩 {{secRestTime.hours}}:{{secRestTime.minutes}}:{{secRestTime.seconds}}
</view>
</van-count-down>
...
...
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