Commit 7d16b7f5 authored by Xuguangxing's avatar Xuguangxing

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

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