Toggle navigation
Toggle navigation
This project
Loading...
Sign in
zyn
/
cjs-site
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
bruce
2019-05-28 10:49:11 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4b1027467affe050ced2e236f6f3ef5f407668f8
4b102746
1 parent
b7fc7357
优化
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
src/main/java/com/cjs/site/util/union/UnionPayUtil.java
src/main/webapp/view/user/pick/payInfo.jsp
src/main/java/com/cjs/site/util/union/UnionPayUtil.java
View file @
4b10274
...
...
@@ -129,7 +129,7 @@ public class UnionPayUtil {
}
}
try
{
return
URLDecoder
.
decode
(
result
.
toString
(),
"
utf-8
"
);
return
URLDecoder
.
decode
(
result
.
toString
(),
"
GBK
"
);
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
return
"转码出错"
;
...
...
src/main/webapp/view/user/pick/payInfo.jsp
View file @
4b10274
...
...
@@ -27,6 +27,7 @@
this
.
countdown
=
120
;
this
.
count
=
1
;
this
.
billNo
=
''
;
this
.
interval
=
''
;
},
bind
:
function
()
{
$
(
document
).
on
(
'click'
,
'#payBtn'
,
this
.
showPayDialog
);
...
...
@@ -51,7 +52,11 @@
skin
:
'payDialogContent'
,
btnAlign
:
'c'
,
moveType
:
1
,
content
:
''
content
:
''
,
cancel
:
function
(){
Pay
.
count
=
11
;
window
.
clearInterval
(
Pay
.
interval
);
}
});
var
htmlStr
=
''
;
htmlStr
+=
'<div style="width:100%;height:50px;font-size:16px;text-align:center;padding-top:30px;">'
...
...
@@ -74,10 +79,11 @@
});
qrcode
.
clear
();
qrcode
.
makeCode
(
data
.
qrCode
);
Pay
.
count
=
1
;
Pay
.
billNo
=
data
.
billNo
;
setTimeout
(
function
()
{
setInterval
(
function
()
{
Pay
.
ajaxstatus
()},
5000
);
},
5
000
);
Pay
.
interval
=
setInterval
(
function
()
{
Pay
.
ajaxstatus
()},
5000
);
},
3
000
);
Pay
.
_timer
();
}
else
{
layer
.
msg
(
data
.
msg
,
{
icon
:
'2'
});
...
...
@@ -90,17 +96,16 @@
type
:
"get"
,
url
:
"/pick/unionPay/query?billNo="
+
Pay
.
billNo
,
success
:
function
(
data
)
{
console
.
info
(
data
)
if
(
data
.
status
===
'PAID'
)
{
layer
.
msg
(
'付款成功'
,
{
icon
:
'1'
});
setTimeout
(
function
()
{
window
.
location
.
href
=
"/user/pick/record"
;
//页面跳转
window
.
location
.
href
=
"/user/pick/record"
;
},
3
*
1000
)
}
else
if
(
data
.
status
===
'CLOSED'
)
{
layer
.
msg
(
'二维码已失效,请重新扫码支付'
,
{
icon
:
'
1
'
});
layer
.
msg
(
'二维码已失效,请重新扫码支付'
,
{
icon
:
'
2
'
});
setTimeout
(
function
()
{},
5
*
1000
)
}
else
if
(
data
.
status
===
'UNKNOWN'
)
{
layer
.
msg
(
'付款失败,请重新扫码支付'
,
{
icon
:
'
1
'
});
layer
.
msg
(
'付款失败,请重新扫码支付'
,
{
icon
:
'
2
'
});
setTimeout
(
function
()
{},
5
*
1000
)
}
},
...
...
@@ -111,7 +116,7 @@
},
_timer
:
function
()
{
if
(
Pay
.
countdown
==
0
)
{
if
(
Pay
.
count
>
5
)
{
if
(
Pay
.
count
>
10
)
{
return
;
}
$
.
ajax
({
...
...
@@ -119,7 +124,7 @@
url
:
"/pick/unionPay/createOrder"
,
success
:
function
(
data
)
{
if
(
data
.
code
)
{
Pay
.
countdown
=
120
;
zx
Pay
.
countdown
=
120
;
var
qrcode
=
new
QRCode
(
document
.
getElementById
(
"qrcode"
),
{
width
:
200
,
height
:
200
,
...
...
Please
register
or
login
to post a comment