Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
group-buy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
group-buy-ui
Commits
7d16b7f5
Commit
7d16b7f5
authored
Sep 23, 2021
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 处理开团和参团的参数回调问题
parent
318047f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
bottomNav.vue
src/views/goodsDetail/components/bottomNav.vue
+12
-5
index.vue
src/views/goodsDetail/index.vue
+5
-1
No files found.
src/views/goodsDetail/components/bottomNav.vue
View file @
7d16b7f5
...
...
@@ -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
);
}
}
};
...
...
src/views/goodsDetail/index.vue
View file @
7d16b7f5
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment