Commit f1eaf31a authored by Xuguangxing's avatar Xuguangxing

feat: 处理参团后按钮展示问题

parent 75121f0a
......@@ -63,7 +63,7 @@
<group-desc-info
:group-info="detailInfo.groupBuyInfo || {}"
:timestemp="groupTimestemp"
:show-button-group="showShareButton"
:show-button-group="true"
@changeButtonVisible="changeButtonVisible"
/>
<successInfo :group-info="detailInfo.groupBuyInfo || {}" />
......@@ -119,7 +119,6 @@ export default {
showInfo: false,
inProgress: false, // 活动是否已经开始
countDownText: '',
showShareButton: false, // 是否显示分享按钮
stockPercentage: 0,
// 以下是原有的data
detailParam: {
......@@ -188,7 +187,6 @@ export default {
}
console.log(this.stockPercentage);
}
this.showShareButton = res.groupBuyInfo.groupBuyStatus == 1 ? true : false;
this.imgList = res.imageUrl || [];
this.detailInfo = res;
this.setStartStatus(res);
......
......@@ -94,7 +94,8 @@ export default {
payStatusName: '',
payMethodName: '',
payType: '',
sharePicData: {}
sharePicData: {},
picUrl: ''
};
},
created() {
......@@ -111,9 +112,14 @@ export default {
this.getCouponList();
},
mounted() {
EventBus.$on('shareClickItem', ({ ev }) => {
const _this = this;
EventBus.$on('shareClickItem', async function({ ev, nativeBridge }) {
if (ev === 'pic') {
// 处理图片url
nativeBridge.openNewUrl({
newUrl: `/pages/goodshare/index?url=${encodeURIComponent(JSON.stringify(_this.picUrl))}`
});
_this.$store.dispatch('goods_share_close');
}
});
},
......@@ -123,12 +129,12 @@ export default {
methods: {
outputPicUrl(res) {
console.log(res);
this.$store.dispatch('goods_share_open', { res });
this.picUrl = res;
this.$store.dispatch('goods_share_open');
console.log(this.picUrl);
},
async setShareData() {
const [res] = await groupBuyApi.getGroupShareInfo({
orderNo: this.orderNo
});
const [res] = await groupBuyApi.getGroupShareInfo(this.orderNo);
this.sharePicData = res;
this.$refs.sharePic.createAndUploadPic();
},
......
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