Commit 099dfc16 authored by beisir's avatar beisir

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

parents 65cd52fb 75121f0a
...@@ -86,14 +86,11 @@ export default { ...@@ -86,14 +86,11 @@ export default {
}, },
methods: { methods: {
async createAndUploadPic() { async createAndUploadPic() {
console.log(999);
const _this = this; const _this = this;
const [qrcodeUrl] = await groupBuyApi.getQrcodeUrl(this.sharePicData); const [qrcodeUrl] = await groupBuyApi.getQrcodeUrl(this.sharePicData);
console.log(888);
this.qrcodeUrl = qrcodeUrl; this.qrcodeUrl = qrcodeUrl;
const [res] = await qiNiuApi.getQiniuToken(); const [res] = await qiNiuApi.getQiniuToken();
const token = res.token; const token = res.token;
console.log(777);
this.$nextTick(() => { this.$nextTick(() => {
html2canvas(this.$refs.sharePic, { html2canvas(this.$refs.sharePic, {
width: 1080, width: 1080,
......
...@@ -19,7 +19,12 @@ ...@@ -19,7 +19,12 @@
</p> </p>
<div class="actions"> <div class="actions">
<cr-button shape="circle" type="default" @click="goPage(1)">我的拼团</cr-button> <cr-button shape="circle" type="default" @click="goPage(1)">我的拼团</cr-button>
<cr-button shape="circle" class="actions__back" :plain="true" type="primary" @click="share" <cr-button
shape="circle"
class="actions__back"
:plain="true"
type="primary"
@click="setShareData"
>邀请好友</cr-button >邀请好友</cr-button
> >
</div> </div>
...@@ -104,12 +109,11 @@ export default { ...@@ -104,12 +109,11 @@ export default {
this.payStatus = success ? '订单支付成功' : '订单支付失败'; this.payStatus = success ? '订单支付成功' : '订单支付失败';
this.payStatusName = success ? '支付成功' : '支付失败'; this.payStatusName = success ? '支付成功' : '支付失败';
this.getCouponList(); this.getCouponList();
this.setShareData();
}, },
mounted() { mounted() {
EventBus.$on('shareClickItem', ({ ev }) => { EventBus.$on('shareClickItem', ({ ev }) => {
if (ev === 'pic') { if (ev === 'pic') {
this.createPic(); // 处理图片url
} }
}); });
}, },
...@@ -119,21 +123,15 @@ export default { ...@@ -119,21 +123,15 @@ export default {
methods: { methods: {
outputPicUrl(res) { outputPicUrl(res) {
console.log(res); console.log(res);
this.$store.dispatch('goods_share_open', { res });
}, },
async setShareData() { async setShareData() {
const [res] = await groupBuyApi.getGroupShareInfo({ const [res] = await groupBuyApi.getGroupShareInfo({
orderNo: this.orderNo orderNo: this.orderNo
}); });
this.sharePicData = res; this.sharePicData = res;
},
createPic() {
console.log(typeof this.$refs.sharePic.createAndUploadPic);
this.$refs.sharePic.createAndUploadPic(); this.$refs.sharePic.createAndUploadPic();
}, },
share() {
// 分享
this.$store.dispatch('goods_share_open');
},
// goPay() { // goPay() {
// this.$track?.registeredEvents('h5_RechargeResultPageClick', { // this.$track?.registeredEvents('h5_RechargeResultPageClick', {
// commodity_id: this.skuID, // commodity_id: this.skuID,
......
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