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
83b1317e
Commit
83b1317e
authored
Oct 03, 2021
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 订单详情页增加时间校验
parent
154d6a1a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
4 deletions
+37
-4
bottomNav.vue
src/views/goodsDetail/components/bottomNav.vue
+11
-2
groupDescInfo.vue
src/views/goodsDetail/components/groupDescInfo.vue
+22
-2
smallPic.vue
src/views/goodsDetail/smallPic.vue
+4
-0
No files found.
src/views/goodsDetail/components/bottomNav.vue
View file @
83b1317e
...
...
@@ -60,7 +60,7 @@
邀请好友
</cr-button>
<cr-button
v-
else
v-
if=
"info.groupBuyStatus != 1 && !timeIsOver"
shape=
"circle"
plain
:disabled=
"disabled"
...
...
@@ -102,9 +102,18 @@ export default {
},
data
()
{
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
:
{
toList
()
{
const
{
activityId
}
=
this
.
$route
.
query
||
''
;
...
...
src/views/goodsDetail/components/groupDescInfo.vue
View file @
83b1317e
...
...
@@ -42,7 +42,13 @@
@
click=
"share"
>
邀请好友
</cr-button
>
<cr-button
v-else
plain
block
shape=
"circle"
type=
"primary"
@
click=
"toList"
<cr-button
v-if=
"groupInfo.groupBuyStatus != 1 && !timeIsOver"
plain
block
shape=
"circle"
type=
"primary"
@
click=
"toList"
>
查看其他商品
</cr-button
>
</div>
...
...
@@ -68,6 +74,14 @@ export default {
default
:
()
=>
{
return
{};
}
},
endTime
:
{
type
:
String
,
default
:
''
},
currentTime
:
{
type
:
String
,
default
:
''
}
},
data
()
{
...
...
@@ -78,9 +92,15 @@ export default {
2
:
'
恭喜成团!
'
,
3
:
'
哎呀,拼团时间已过,尚未成团!
'
,
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
()
{
this
.
$nextTick
(()
=>
{
if
(
this
.
$refs
.
buttonArea
)
{
...
...
src/views/goodsDetail/smallPic.vue
View file @
83b1317e
...
...
@@ -74,6 +74,8 @@
<group-desc-info
:group-info=
"detailInfo.groupBuyInfo ||
{}"
:timestemp="groupTimestemp"
:current-time="detailInfo.currentTime"
:end-time="detailInfo.endTime"
:show-button-group="true"
@changeButtonVisible="changeButtonVisible"
@share="setShareData"
...
...
@@ -102,6 +104,8 @@
</div>
<bottom-nav
v-if=
"showButtonNav"
:current-time=
"detailInfo.currentTime"
:end-time=
"detailInfo.endTime"
:info=
"detailInfo.groupBuyInfo ||
{}"
:status="2"
:disabled="false"
...
...
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