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
b88907fc
Commit
b88907fc
authored
Sep 28, 2021
by
beisir
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/group-buy' of git.quantgroup.cn:ui/group-buy-ui into feat/group-buy
parents
6463248d
35c3de61
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
28 deletions
+54
-28
bottomNav.vue
src/views/goodsDetail/components/bottomNav.vue
+38
-26
index.vue
src/views/goodsDetail/index.vue
+9
-1
smallPic.vue
src/views/goodsDetail/smallPic.vue
+7
-1
No files found.
src/views/goodsDetail/components/bottomNav.vue
View file @
b88907fc
<
template
>
<div
class=
"goods-bottom"
>
<template
v-if=
"status == 1"
>
<template
v-if=
"!groupId"
>
<cr-button
shape=
"circle"
:disabled=
"disabled"
type=
"primary"
block
@
click=
"createOrJoin(1)"
>
立即开团
</cr-button>
<template
v-if=
"groupId"
>
<template
v-if=
"info.groupBuyInfo.groupStatus == 2 || info.groupBuyInfo.groupStatus == 3"
>
<cr-button
shape=
"circle"
:disabled=
"disabled"
type=
"primary"
block
@
click=
"createOrJoin(1)"
>
立即开团
</cr-button>
</
template
>
<
template
v-else
>
<cr-button
class=
"mutiplie"
plain
type=
"primary"
shape=
"circle"
:disabled=
"disabled"
@
click=
"createOrJoin(2)"
>
自己做团长
</cr-button
>
<cr-button
v-if=
"!info.joinGroup"
class=
"mutiplie"
shape=
"circle"
:disabled=
"disabled"
type=
"primary"
block
@
click=
"createOrJoin(3)"
>
立即参团
</cr-button>
</
template
>
</template>
<
template
v-else
>
<cr-button
class=
"mutiplie"
plain
type=
"primary"
shape=
"circle"
:disabled=
"disabled"
@
click=
"createOrJoin(2)"
>
自己做团长
</cr-button
>
<!-- canJoinGroupBuyAgain -> 是否可以参团 groupBuyStatus 1->拼团中 -->
<cr-button
v-if=
"info.canJoinGroupBuyAgain && info.groupBuyStatus == 1"
class=
"mutiplie"
shape=
"circle"
:disabled=
"disabled"
type=
"primary"
block
@
click=
"createOrJoin(
3
)"
@
click=
"createOrJoin(
1
)"
>
立即
参
团
立即
开
团
</cr-button>
</
template
>
</template>
<
template
v-else
>
<cr-button
v-if=
"info.groupBuyStatus == 1
|| info.groupBuyStatus == 0
"
v-if=
"info.groupBuyStatus == 1"
shape=
"circle"
:disabled=
"disabled"
type=
"primary"
...
...
@@ -106,7 +118,7 @@ export default {
},
createOrJoin
(
mark
)
{
// 参团
// mark 1-> 开团
3
-> 参团 2->自己做团长
// mark 1-> 开团
0
-> 参团 2->自己做团长
this
.
$emit
(
'
buy
'
,
mark
);
}
}
...
...
src/views/goodsDetail/index.vue
View file @
b88907fc
...
...
@@ -269,7 +269,6 @@ export default {
})
},
created
()
{
console
.
log
(
this
.
$route
);
this
.
hasLogin
=
localStorage
.
get
(
'
vccToken
'
)
?
true
:
false
;
this
.
detailParam
=
{
...
this
.
$route
.
query
};
localStorage
.
remove
(
'
orderData
'
);
...
...
@@ -373,6 +372,15 @@ export default {
const
[
res
]
=
await
goods
.
detailInfo
(
detailParam
);
// canJoinGroupBuyAgain groupStatus
try
{
if
(
res
.
groupBuyInfo
?.
groupId
)
{
localStorage
.
set
(
'
groupBuyGroupId
'
,
res
.
groupBuyInfo
.
groupId
||
''
);
// 设置groupBuyGroupId,用于下单
this
.
groupId
=
+
res
.
groupBuyInfo
.
groupId
||
0
;
}
if
(
res
.
groupBuyInfo
?.
joinGroup
)
{
// 如果当前用户参了团到拼团详情
const
query
=
{
...
this
.
$route
.
query
};
return
this
.
$router
.
replace
({
name
:
'
groupBuySkuInfoSmallPic
'
,
query
});
}
this
.
imgList
=
res
.
imageUrl
||
[];
this
.
detailInfo
=
res
;
this
.
setStartStatus
(
res
);
...
...
src/views/goodsDetail/smallPic.vue
View file @
b88907fc
...
...
@@ -99,7 +99,13 @@
/>
</div>
</div>
<bottom-nav
v-if=
"showButtonNav"
:status=
"2"
:disabled=
"false"
@
share=
"setShareData"
/>
<bottom-nav
v-if=
"showButtonNav"
:info=
"detailInfo.groupBuyInfo ||
{}"
:status="2"
:disabled="false"
@share="setShareData"
/>
</div>
</
template
>
<
script
>
...
...
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