Commit 2ce78d9f authored by beisir's avatar beisir

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

parents 3af60d28 a5592cdb
...@@ -59,10 +59,10 @@ export default { ...@@ -59,10 +59,10 @@ export default {
}, },
mounted() { mounted() {
EventBus.$on('goods_share_info', ({ shareInfo, type }) => { EventBus.$on('goods_share_info', ({ shareInfo, type }) => {
// if (!isApp && !isWxMp) { if (!isApp && !isWxMp) {
// this.tipDialogMessage(); this.tipDialogMessage();
// return; return;
// } }
this.type = type; this.type = type;
if (typeof shareInfo === 'object') { if (typeof shareInfo === 'object') {
this.sharePicData = shareInfo; this.sharePicData = shareInfo;
......
...@@ -32,7 +32,9 @@ ...@@ -32,7 +32,9 @@
</div> </div>
<div class="groupProcess"> <div class="groupProcess">
<div class="desc"> <div class="desc">
还差 <span>{{ sharePicData.needGuys }}人</span> 成团,参团截止时间5月3日 还差 <span>{{ sharePicData.needGuys }}人</span> 成团,<template v-if="endTime != ''"
>参团截止时间 {{ endTime }}</template
>
</div> </div>
</div> </div>
</div> </div>
...@@ -82,7 +84,8 @@ export default { ...@@ -82,7 +84,8 @@ export default {
avatorList: [], avatorList: [],
openGroupCnt: 7, openGroupCnt: 7,
maxCount: 0, maxCount: 0,
sharePicData: {} sharePicData: {},
endTime: ''
}; };
}, },
methods: { methods: {
...@@ -95,6 +98,7 @@ export default { ...@@ -95,6 +98,7 @@ export default {
}, },
async createAndUploadPic(sharePicData) { async createAndUploadPic(sharePicData) {
this.sharePicData = sharePicData; this.sharePicData = sharePicData;
this.endTime = sharePicData.endTime ? sharePicData.endTime.split(' ')[0] : '';
this.handleAvator(sharePicData); this.handleAvator(sharePicData);
const _this = this; const _this = this;
const [qrcodeUrl] = await groupBuyApi.getQrcodeUrl(sharePicData); const [qrcodeUrl] = await groupBuyApi.getQrcodeUrl(sharePicData);
......
...@@ -295,9 +295,11 @@ export default { ...@@ -295,9 +295,11 @@ export default {
methods: { methods: {
setShareData() { setShareData() {
const avatorList = []; const avatorList = [];
this.detailInfo.groupBuyInfo.groupBuyValidUserInfoList.map(v => { if (this.detailInfo.groupBuyInfo.groupBuyValidUserInfoList) {
avatorList.push(v.avatar); this.detailInfo.groupBuyInfo.groupBuyValidUserInfoList.map(v => {
}); avatorList.push(v.avatar);
});
}
const sharePicData = { const sharePicData = {
groupBuySuccessGuys: this.detailInfo?.groupBuyInfo.groupBuySuccessPersonCount, groupBuySuccessGuys: this.detailInfo?.groupBuyInfo.groupBuySuccessPersonCount,
salePrice: this.detailInfo.price, // y salePrice: this.detailInfo.price, // y
...@@ -312,7 +314,8 @@ export default { ...@@ -312,7 +314,8 @@ export default {
skuImg: this.detailInfo.thumbImageUrl, // y, skuImg: this.detailInfo.thumbImageUrl, // y,
activityPrice: this.detailInfo.activityPrice, // y activityPrice: this.detailInfo.activityPrice, // y
skuNo: this.detailParam.skuNo, skuNo: this.detailParam.skuNo,
peoplePhotoList: avatorList peoplePhotoList: avatorList,
endTime: this.detailInfo.endTime || ''
}; };
EventBus.$emit('goods_share_info', { EventBus.$emit('goods_share_info', {
shareInfo: sharePicData, shareInfo: sharePicData,
......
...@@ -163,9 +163,11 @@ export default { ...@@ -163,9 +163,11 @@ export default {
methods: { methods: {
setShareData() { setShareData() {
const avatorList = []; const avatorList = [];
this.detailInfo.groupBuyInfo.groupBuyValidUserInfoList.map(v => { if (this.detailInfo.groupBuyInfo.groupBuyValidUserInfoList) {
avatorList.push(v.avatar); this.detailInfo.groupBuyInfo.groupBuyValidUserInfoList.map(v => {
}); avatorList.push(v.avatar);
});
}
const sharePicData = { const sharePicData = {
groupBuySuccessGuys: this.detailInfo?.groupBuyInfo.groupBuySuccessPersonCount, groupBuySuccessGuys: this.detailInfo?.groupBuyInfo.groupBuySuccessPersonCount,
salePrice: this.detailInfo.price, // y salePrice: this.detailInfo.price, // y
...@@ -180,7 +182,8 @@ export default { ...@@ -180,7 +182,8 @@ export default {
skuImg: this.detailInfo.thumbImageUrl, // y, skuImg: this.detailInfo.thumbImageUrl, // y,
activityPrice: this.detailInfo.activityPrice, // y activityPrice: this.detailInfo.activityPrice, // y
skuNo: this.detailParam.skuNo, skuNo: this.detailParam.skuNo,
peoplePhotoList: avatorList peoplePhotoList: avatorList,
endTime: this.detailInfo.endTime || ''
}; };
EventBus.$emit('goods_share_info', { EventBus.$emit('goods_share_info', {
shareInfo: sharePicData, shareInfo: sharePicData,
......
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