Commit a5592cdb authored by Xuguangxing's avatar Xuguangxing

feat: 处理小程序码的问题

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