Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
陈峰
6 years ago
Commit
ea48ef9903e8d1ec7d9b8eac1fb435d8c1f0628b
1 parent
bc698cfa
hix pay lettime bug
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
apps/shopping/controllers/pay.js
public/js/shopping/pay.page.js
apps/shopping/controllers/pay.js
View file @
ea48ef9
...
...
@@ -39,6 +39,14 @@ const online = (req, res, next) => {
return
next
();
}
if
(
order
.
pay_lefttime
)
{
order
.
pay_lefttime
=
+
order
.
pay_lefttime
-
3600
;
if
(
order
.
pay_lefttime
<
0
)
{
order
.
pay_lefttime
=
0
;
}
}
order
.
payment_type
=
parseInt
(
order
.
payment_type
,
10
);
if
(
amount
<=
0
||
order
.
payment_type
===
2
)
{
...
...
public/js/shopping/pay.page.js
View file @
ea48ef9
...
...
@@ -11,6 +11,7 @@ var $btnby = $('input.btnby'),
$formGo
=
$
(
'.form-go'
),
Alert
=
dialog
.
Alert
,
time
=
$
(
'.js-time'
).
data
(
'time'
),
timeInterval
,
$timer
=
$
(
'.js-timer'
),
C_ID
;
...
...
@@ -61,7 +62,7 @@ payPage = {
});
this
.
setTimer
();
setInterval
(
function
()
{
timeInterval
=
setInterval
(
function
()
{
self
.
setTimer
();
},
1000
);
},
...
...
@@ -139,10 +140,14 @@ payPage = {
});
},
setTimer
:
function
()
{
var
hour
=
Math
.
floor
(
time
/
3600
);
var
minus
=
Math
.
floor
((
time
%
3600
)
/
60
);
var
second
=
time
%
60
;
var
text
=
''
;
if
(
time
<
0
)
{
return
clearInterval
(
timeInterval
);
}
let
hour
=
Math
.
floor
(
time
/
3600
);
let
minus
=
Math
.
floor
((
time
%
3600
)
/
60
);
let
second
=
time
%
60
;
let
text
=
''
;
if
(
hour
>
0
)
{
text
+=
hour
+
'小时'
;
...
...
Please
register
or
login
to post a comment