Commit 7d16b7f5 authored by Xuguangxing's avatar Xuguangxing

feat: 处理开团和参团的参数回调问题

parent 318047f8
......@@ -8,7 +8,7 @@
type="primary"
shape="circle"
:disabled="disabled"
@click="createOrJoin"
@click="createOrJoin(1)"
>自己做团长</cr-button
>
<cr-button
......@@ -17,13 +17,19 @@
:disabled="disabled"
type="primary"
block
@click="createOrJoin"
@click="createOrJoin(0)"
>
立即参团
</cr-button>
</template>
<template v-else>
<cr-button shape="circle" :disabled="disabled" type="primary" block @click="createOrJoin">
<cr-button
shape="circle"
:disabled="disabled"
type="primary"
block
@click="createOrJoin(1)"
>
立即开团
</cr-button>
</template>
......@@ -74,12 +80,13 @@ export default {
// 邀请好友
this.$emit('share');
},
createOrJoin() {
createOrJoin(mark) {
// 参团
// mark 1-> 开团 2-> 参团
if (this.checkLogin()) {
return;
}
this.$emit('buy');
this.$emit('buy', mark);
}
}
};
......
......@@ -262,6 +262,7 @@ export default {
created() {
this.hasLogin = localStorage.get('vccToken') != 'null' ? true : false;
this.detailParam = { ...this.$route.query };
localStorage.remove('orderData');
localStorage.set('activityId', this.detailParam.templateId); // 设置活动模板id,用于下单
if (this.detailParam.groupBuyGroupId) {
localStorage.set('groupBuyGroupId', this.detailParam.groupBuyGroupId); // 设置groupBuyGroupId,用于下单
......@@ -287,11 +288,14 @@ export default {
this.swiperCurrent = index;
},
// ka渠道逻辑
goVccOrDetail() {
goVccOrDetail(res) {
if (!this.hasLogin) {
this.checkLogin();
return;
}
if (res == 1) {
localStorage.remove('groupBuyGroupId'); // 开团或者自己做团长的时候需要移除groupBuyGroupId,再去调下单
}
this.toOrder();
},
setStartStatus(data) {
......
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