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
1aa3f3e1
Commit
1aa3f3e1
authored
Oct 09, 2021
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理按钮状态并新增按钮
parent
cf969ed1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
53 deletions
+63
-53
bottomNav.vue
src/views/goodsDetail/components/bottomNav.vue
+9
-17
groupDescInfo.vue
src/views/goodsDetail/components/groupDescInfo.vue
+52
-33
smallPic.vue
src/views/goodsDetail/smallPic.vue
+1
-2
createOrder.vue
src/views/order/createOrder.vue
+1
-1
No files found.
src/views/goodsDetail/components/bottomNav.vue
View file @
1aa3f3e1
...
@@ -50,25 +50,26 @@
...
@@ -50,25 +50,26 @@
</template>
</template>
<
template
v-else
>
<
template
v-else
>
<cr-button
<cr-button
v-if=
"info.groupBuyStatus == 1
"
class=
"mutiplie
"
shape=
"circle"
shape=
"circle"
plain
:disabled=
"disabled"
:disabled=
"disabled"
type=
"primary"
type=
"primary"
block
block
@
click=
"
shareTo
"
@
click=
"
toList
"
>
>
邀请好友
查看活动详情
</cr-button>
</cr-button>
<cr-button
<cr-button
v-if=
"info.groupBuyStatus != 1 && !timeIsOver"
v-if=
"info.groupBuyStatus == 1"
class=
"mutiplie"
shape=
"circle"
shape=
"circle"
plain
:disabled=
"disabled"
:disabled=
"disabled"
type=
"primary"
type=
"primary"
block
block
@
click=
"
toList
"
@
click=
"
shareTo
"
>
>
查看其他商品
邀请好友
</cr-button>
</cr-button>
</
template
>
</
template
>
</div>
</div>
...
@@ -110,18 +111,9 @@ export default {
...
@@ -110,18 +111,9 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
nativeBridge
:
null
,
nativeBridge
:
null
timeIsOver
:
false
};
};
},
},
created
()
{
if
(
this
.
status
==
2
)
{
// 订单详情页
const
currentTime
=
new
Date
(
this
.
currentTime
.
replace
(
/
\-
/g
,
'
/
'
)).
getTime
();
const
endTime
=
new
Date
(
this
.
endTime
.
replace
(
/
\-
/g
,
'
/
'
)).
getTime
();
this
.
timeIsOver
=
currentTime
>=
endTime
?
true
:
false
;
}
},
methods
:
{
methods
:
{
toList
()
{
toList
()
{
const
{
activityId
}
=
this
.
$route
.
query
||
''
;
const
{
activityId
}
=
this
.
$route
.
query
||
''
;
...
...
src/views/goodsDetail/components/groupDescInfo.vue
View file @
1aa3f3e1
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<div
class=
"group-info-desc"
>
<div
class=
"group-info-desc"
>
<div
class=
"desc-item"
>
<div
class=
"desc-item"
>
<template
v-if=
"groupInfo.groupBuyStatus == 1"
>
<template
v-if=
"groupInfo.groupBuyStatus == 1"
>
<!-- 拼团中状态 -->
<template
v-if=
"!groupInfo.joinGroup && !groupInfo.canJoinGroupBuyAgain"
>
<template
v-if=
"!groupInfo.joinGroup && !groupInfo.canJoinGroupBuyAgain"
>
<!-- 您不符合参与此团的条件 -->
<!-- 您不符合参与此团的条件 -->
</
template
>
</
template
>
...
@@ -14,11 +15,16 @@
...
@@ -14,11 +15,16 @@
</template>
</template>
<
template
v-else
>
<
template
v-else
>
<template
v-if=
"groupInfo.groupBuyStatus != 2"
>
<template
v-if=
"groupInfo.groupBuyStatus != 2"
>
<p
class=
"desc"
>
<!-- 拼团非成功状态 -->
<p
v-if=
"groupInfo.groupBuyStatus == 3"
class=
"desc"
>
{{
groupInfo
.
groupBuyStatus
.
failedReason
}}
</p>
<p
v-else
class=
"desc"
>
{{
statusTextMap
[
groupInfo
.
groupBuyStatus
]
}}
{{
statusTextMap
[
groupInfo
.
groupBuyStatus
]
}}
</p>
</p>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<!-- 拼团成功 -->
<p
v-if=
"groupInfo.joinGroup"
class=
"desc"
>
<p
v-if=
"groupInfo.joinGroup"
class=
"desc"
>
{{
statusTextMap
[
groupInfo
.
groupBuyStatus
]
}}
{{
statusTextMap
[
groupInfo
.
groupBuyStatus
]
}}
</p>
</p>
...
@@ -34,28 +40,29 @@
...
@@ -34,28 +40,29 @@
<!-- </template> -->
<!-- </template> -->
</div>
</div>
<div
v-if=
"showButtonGroup"
ref=
"buttonArea"
class=
"button-area"
>
<div
v-if=
"showButtonGroup"
ref=
"buttonArea"
class=
"button-area"
>
<
cr-button
<
div
v-if=
"groupInfo.groupBuyStatus == 1"
class=
"shareToButton"
>
v-if=
"groupInfo.groupBuyStatus == 1"
<cr-button
block
shape=
"circle"
type=
"primary"
@
click=
"share"
>
邀请好友
</cr-button>
block
</div>
shape=
"circle"
<div
class=
"toListButton"
>
type=
"primary"
<cr-button
@
click=
"share"
plain
>
邀请好友
</cr-button
block
>
shape=
"circle"
<cr-button
type=
"default"
v-if=
"groupInfo.groupBuyStatus != 1 && !timeIsOver
"
class=
"toOrderList
"
plain
@
click=
"toOrderList"
block
>
查看我的拼团
</cr-button
shape=
"circle"
>
type=
"primary
"
<cr-button
plain
block
shape=
"circle"
type=
"primary"
@
click=
"toList
"
@
click=
"toList"
>
返回活动列表
</cr-button
>
查看其他商品
</cr-button
>
>
</div
>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
countDown
from
'
@/components/countDown
'
;
import
countDown
from
'
@/components/countDown
'
;
import
{
saTrackEvent
}
from
'
@/service/sa.service
'
;
export
default
{
export
default
{
components
:
{
components
:
{
countDown
countDown
...
@@ -75,11 +82,7 @@ export default {
...
@@ -75,11 +82,7 @@ export default {
return
{};
return
{};
}
}
},
},
endTime
:
{
skuNo
:
{
type
:
String
,
default
:
''
},
currentTime
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
}
}
...
@@ -92,15 +95,9 @@ export default {
...
@@ -92,15 +95,9 @@ export default {
2
:
'
恭喜成团!
'
,
2
:
'
恭喜成团!
'
,
3
:
'
哎呀,拼团时间已过,尚未成团!
'
,
3
:
'
哎呀,拼团时间已过,尚未成团!
'
,
4
:
'
已发货
'
4
:
'
已发货
'
},
}
timeIsOver
:
false
};
};
},
},
created
()
{
const
currentTime
=
new
Date
(
this
.
currentTime
.
replace
(
/
\-
/g
,
'
/
'
)).
getTime
();
const
endTime
=
new
Date
(
this
.
endTime
.
replace
(
/
\-
/g
,
'
/
'
)).
getTime
();
this
.
timeIsOver
=
currentTime
>=
endTime
?
true
:
false
;
},
mounted
()
{
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
if
(
this
.
$refs
.
buttonArea
)
{
if
(
this
.
$refs
.
buttonArea
)
{
...
@@ -135,7 +132,16 @@ export default {
...
@@ -135,7 +132,16 @@ export default {
this
.
$router
.
push
({
name
:
'
groupBuyList
'
,
query
:
{
activityId
}
});
this
.
$router
.
push
({
name
:
'
groupBuyList
'
,
query
:
{
activityId
}
});
}
}
},
},
toOrderList
()
{
this
.
$router
.
push
(
'
/orderList/0
'
);
},
share
()
{
share
()
{
if
(
this
.
skuNo
)
{
saTrackEvent
(
'
H5_GroupDetailPageInviteFriendsBtnClick
'
,
{
sku_no
:
this
.
skuNo
,
group_id
:
this
.
groupInfo
?.
groupId
||
''
});
}
this
.
$emit
(
'
share
'
);
this
.
$emit
(
'
share
'
);
}
}
}
}
...
@@ -148,8 +154,10 @@ export default {
...
@@ -148,8 +154,10 @@ export default {
align-items: center;
align-items: center;
margin-bottom: @padding-xs;
margin-bottom: @padding-xs;
.desc {
.desc {
margin-right: @padding-unit;
text-align: center;
.text-14();
span {
span {
.text-14();
color: @red-dark;
color: @red-dark;
margin: 0 @padding-unit;
margin: 0 @padding-unit;
}
}
...
@@ -161,12 +169,23 @@ export default {
...
@@ -161,12 +169,23 @@ export default {
align-items: center;
align-items: center;
color: @gray-4;
color: @gray-4;
.text-12();
.text-12();
margin-bottom: @padding-
md
;
margin-bottom: @padding-
sm
;
}
}
.button-area {
.button-area {
button {
button {
font-size: 16px;
font-size: 16px;
margin-bottom: @padding-md;
margin-bottom: @padding-sm;
}
.toListButton {
display: flex;
flex-direction: row;
justify-content: space-between;
button {
width: 48%;
&.toOrderList {
color: @gray-4;
}
}
}
}
}
}
</
style
>
</
style
>
src/views/goodsDetail/smallPic.vue
View file @
1aa3f3e1
...
@@ -74,9 +74,8 @@
...
@@ -74,9 +74,8 @@
<group-desc-info
<group-desc-info
:group-info=
"detailInfo.groupBuyInfo ||
{}"
:group-info=
"detailInfo.groupBuyInfo ||
{}"
:timestemp="groupTimestemp"
:timestemp="groupTimestemp"
:current-time="detailInfo.currentTime"
:end-time="detailInfo.endTime"
:show-button-group="true"
:show-button-group="true"
:sku-no="detailParam.skuNo"
@changeButtonVisible="changeButtonVisible"
@changeButtonVisible="changeButtonVisible"
@share="setShareData"
@share="setShareData"
/>
/>
...
...
src/views/order/createOrder.vue
View file @
1aa3f3e1
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<template
v-if=
"orderInfo.calcFeeInfo.totalSkuFee !== '0.00'"
>
<template
v-if=
"orderInfo.calcFeeInfo
&& orderInfo.calcFeeInfo
.totalSkuFee !== '0.00'"
>
<FeeInfo
:calc-fee-info=
"orderInfo.calcFeeInfo"
/>
<FeeInfo
:calc-fee-info=
"orderInfo.calcFeeInfo"
/>
</
template
>
</
template
>
<div
v-if=
"orderInfo.invalidSkuList && orderInfo.invalidSkuList.length"
class=
"confirm-body"
>
<div
v-if=
"orderInfo.invalidSkuList && orderInfo.invalidSkuList.length"
class=
"confirm-body"
>
...
...
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