Commit 6a4978f8 authored by beisir's avatar beisir

Merge branch 'feat/group-buy' of git.quantgroup.cn:ui/group-buy-ui into feat/group-buy

parents b589ecad 74f95e01
......@@ -73,7 +73,7 @@
}"
/>
</template>
<rules />
<rules :group-info="detailInfo.groupBuyInfo || {}" />
</div>
<span v-if="detailImgList.length" id="goodDetail" class="goods-divider">宝贝详情</span>
<!-- <div v-if="skuDetailList.length" class="goods-detail">
......@@ -348,7 +348,7 @@ export default {
const activityStartTime = new Date(data.startTime.replace(/\-/g, '/')).getTime();
const activityEndTime = new Date(data.endTime.replace(/\-/g, '/')).getTime();
this.groupTimestemp = data.groupBuyInfo.currentGroupEndTime
? new Date(data.groupBuyInfo.currentGroupEndTime).getTime()
? new Date(data.groupBuyInfo.currentGroupEndTime.replace(/\-/g, '/')).getTime()
: -1;
if (currentTime <= activityStartTime) {
// 当前时间小于活动开始时间
......
......@@ -58,23 +58,21 @@
src="../../assets/images/defeat.png"
/>
</div>
<template v-if="inProgress == 1">
<avatorGroup :group-info="detailInfo.groupBuyInfo || {}" />
<group-desc-info
:group-info="detailInfo.groupBuyInfo || {}"
:timestemp="groupTimestemp"
:show-button-group="true"
@changeButtonVisible="changeButtonVisible"
@share="setShareData"
/>
<successInfo :group-info="detailInfo.groupBuyInfo || {}" />
<cr-divider
hairline
:style="{
borderColor: '#ECECEC'
}"
/>
</template>
<avatorGroup :group-info="detailInfo.groupBuyInfo || {}" />
<group-desc-info
:group-info="detailInfo.groupBuyInfo || {}"
:timestemp="groupTimestemp"
:show-button-group="true"
@changeButtonVisible="changeButtonVisible"
@share="setShareData"
/>
<successInfo :group-info="detailInfo.groupBuyInfo || {}" />
<cr-divider
hairline
:style="{
borderColor: '#ECECEC'
}"
/>
<rules :group-info="detailInfo.groupBuyInfo || {}" />
</div>
<span v-if="detailImgList.length" id="goodDetail" class="goods-divider">宝贝详情</span>
......@@ -119,10 +117,8 @@ export default {
},
data() {
return {
timestemp: '', // 大活动结束时间
groupTimestemp: '', // 小团结束时间
showInfo: false,
inProgress: false, // 活动是否已经开始
countDownText: '',
stockPercentage: 0,
sharePicData: {}, // 生成海报图所需要的链接
......@@ -277,25 +273,19 @@ export default {
const activityStartTime = new Date(data.startTime.replace(/\-/g, '/')).getTime();
const activityEndTime = new Date(data.endTime.replace(/\-/g, '/')).getTime();
this.groupTimestemp = data.groupBuyInfo.currentGroupEndTime
? new Date(data.groupBuyInfo.currentGroupEndTime).getTime()
? new Date(data.groupBuyInfo.currentGroupEndTime.replace(/\-/g, '/')).getTime()
: -1;
if (currentTime <= activityStartTime) {
// 当前时间小于活动开始时间
this.timestemp = activityStartTime;
this.countDownText = '距活动开始时间';
this.inProgress = -1;
return;
}
if (currentTime >= activityEndTime) {
this.timestemp = 0;
this.countDownText = '活动已结束';
this.inProgress = 0;
return;
}
if (currentTime > activityStartTime && currentTime < activityEndTime) {
this.timestemp = activityEndTime;
this.countDownText = '距成团结束';
this.inProgress = 1;
return;
}
}
......
......@@ -207,7 +207,7 @@ export default {
newUrl: `/pages/pay/index?orderNo=${data.orderNo}&from=groupbuy`
});
} else if (isApp) {
this.$router.push({ path: `/pay?orderNo=${data.orderNo}` });
this.$router.replace({ path: `/pay?orderNo=${data.orderNo}` });
} else {
return; // todo 处理纯h5情况
// this.$dialog({
......
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