Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
张丽霞
9 years ago
Commit
00002571593c6a97aeee6084e7bfd260911574f4
1 parent
fb0bf608
倒计时小时为0时不展示小时
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
static/js/me/order-detail.js
static/js/me/order-detail.js
View file @
0000257
...
...
@@ -36,26 +36,27 @@ function downCount(options) {
_minute
=
_second
*
60
,
_hour
=
_minute
*
60
,
_day
=
_hour
*
24
,
days
,
hours
,
minutes
,
seconds
;
// calculate dates
days
=
Math
.
floor
(
difference
/
_day
),
hours
=
Math
.
floor
((
difference
%
_day
)
/
_hour
),
minutes
=
Math
.
floor
((
difference
%
_hour
)
/
_minute
),
seconds
=
Math
.
floor
((
difference
%
_minute
)
/
_second
);
// fix dates so that it will show two digets
days
=
(
String
(
days
).
length
>=
2
)
?
days
:
'0'
+
days
;
hours
=
(
String
(
hours
).
length
>=
2
)
?
hours
:
'0'
+
hours
;
minutes
=
(
String
(
minutes
).
length
>=
2
)
?
minutes
:
'0'
+
minutes
;
seconds
=
(
String
(
seconds
).
length
>=
2
)
?
seconds
:
'0'
+
seconds
;
// set to DOM
$countdownContainer
.
removeClass
(
'hide'
);
$countDownHours
.
text
(
'剩余'
+
hours
+
':'
+
minutes
+
':'
+
seconds
);
if
(
hours
===
0
)
{
$countDownHours
.
text
(
'剩余'
+
minutes
+
':'
+
seconds
);
}
else
{
$countDownHours
.
text
(
'剩余'
+
hours
+
':'
+
minutes
+
':'
+
seconds
);
}
difference
-=
1000
;
...
...
Please
register
or
login
to post a comment