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