Commit 7d4166db by 李嘉林

秒杀

parent d0bd56ec
......@@ -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
})
......
......@@ -39,7 +39,7 @@
bind:finish="handleSecFinish"
bind:change="onSecRestTimeChange"
>
<view style="color: #fff;font-size: 24rpx;">
<view style="color: #fff;font-size: 18rpx;line-height: 28rpx;">
距结束还剩 {{secRestTime.hours}}:{{secRestTime.minutes}}:{{secRestTime.seconds}}
</view>
</van-count-down>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment