Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SURPRISED
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
华国豪
SURPRISED
Commits
cbf01efa
Commit
cbf01efa
authored
Nov 13, 2019
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JS支付
parent
4e6a81a6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
476 additions
and
437 deletions
+476
-437
GT_activities.html
html/GT_activities.html
+1
-1
pay.html
html/pay.html
+151
-107
jquery.dataStatistics.js
js/jquery.dataStatistics.js
+324
-329
No files found.
html/GT_activities.html
View file @
cbf01efa
...
...
@@ -148,7 +148,7 @@
<!--<script type="text/javascript" src="js/countdown.js"></script>-->
<script
type=
"text/javascript"
src=
"../js/md5.js"
></script>
<script
type=
"text/javascript"
src=
"../js/mian.js"
></script>
<script
src=
"../js/jquery.dataStatistics.js"
></script>
<script
src=
"../js/jquery.dataStatistics.js
?r=1354341
"
></script>
<script
type=
"text/javascript"
src=
"https://res.wx.qq.com/open/js/jweixin-1.3.2.js"
></script>
<script
type=
"text/javascript"
src=
"../js/layer/layer.js"
></script>
<script
type=
"text/javascript"
src=
"../js/yql.js"
></script>
...
...
html/pay.html
View file @
cbf01efa
<html
lang=
"en"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"span/html; charset=utf-8"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"divport"
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi"
/>
<meta
name=
"divport"
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi"
/>
<meta
name=
"screen-orientation"
content=
"portrait"
>
</meta>
<meta
name=
"x5-orientation"
content=
"portrait"
>
...
...
@@ -11,93 +11,134 @@
<title>
支付订单
</title>
</head>
<style>
body
,
div
,
dl
,
dt
,
dd
,
ul
,
ol
,
li
,
h1
,
h2
,
h3
,
h4
,
h5
,
h6
,
pre
,
code
,
form
,
fieldset
,
legend
,
input
,
button
,
spanarea
,
p
,
blockquote
,
th
,
td
{
body
,
div
,
dl
,
dt
,
dd
,
ul
,
ol
,
li
,
h1
,
h2
,
h3
,
h4
,
h5
,
h6
,
pre
,
code
,
form
,
fieldset
,
legend
,
input
,
button
,
spanarea
,
p
,
blockquote
,
th
,
td
{
margin
:
0
;
padding
:
0
;
}
.pay_page
{
width
:
100%
;
height
:
100%
;
.pay_page
{
width
:
100%
;
height
:
100%
;
background-color
:
#F4F4F4
;
position
:
relative
;
}
.pay_time
{
width
:
100%
;
.pay_time
{
width
:
100%
;
text-align
:
center
;
font-size
:
2rem
;
color
:
#999999
;
padding
:
5rem
0
2rem
0
;
font-size
:
2rem
;
color
:
#999999
;
padding
:
5rem
0
2rem
0
;
}
.pay_time
span
{
margin-left
:
1rem
;
.pay_time
span
{
margin-left
:
1rem
;
}
.pay_price
{
font-size
:
4rem
;
width
:
100%
;
.pay_price
{
font-size
:
4rem
;
width
:
100%
;
text-align
:
center
;
}
.pay_price
span
:first-child
{
font-size
:
2rem
;
.pay_price
span
:first-child
{
font-size
:
2rem
;
}
.pay_quan
{
margin
:
2rem
0
0
0
;
width
:
100%
;
.pay_quan
{
margin
:
2rem
0
0
0
;
width
:
100%
;
text-align
:
center
;
color
:
#999999
;
font-size
:
2rem
;
color
:
#999999
;
font-size
:
2rem
;
}
.price_Top
{
.price_Top
{
background-color
:
#fff
;
}
.pay_zhifu
{
width
:
90%
;
height
:
10rem
;
.pay_zhifu
{
width
:
90%
;
height
:
10rem
;
display
:
flex
;
margin
:
4rem
auto
;
margin
:
4rem
auto
;
align-items
:
center
;
}
.pay_circle
{
width
:
3rem
;
height
:
3rem
;
border
:
1px
solid
#CCCCCC
;
.pay_circle
{
width
:
3rem
;
height
:
3rem
;
border
:
1px
solid
#CCCCCC
;
border-radius
:
50%
;
}
.pay_one
{
width
:
3rem
;
height
:
3rem
;
.pay_one
{
width
:
3rem
;
height
:
3rem
;
}
.pay_two
{
.pay_two
{
display
:
inline-block
;
font-size
:
2.5rem
;
margin-left
:
3rem
;
width
:
47rem
;
font-size
:
2.5rem
;
margin-left
:
3rem
;
width
:
47rem
;
}
.pay_three
{
display
:
inline-block
;
.pay_three
{
display
:
inline-block
;
}
.pay_three
img
{
width
:
3rem
;
height
:
3rem
;
.pay_three
img
{
width
:
3rem
;
height
:
3rem
;
}
.pay_btndiv
{
width
:
100%
;
.pay_btndiv
{
width
:
100%
;
position
:
absolute
;
bottom
:
4rem
;
bottom
:
4rem
;
text-align
:
center
;
}
.pay_btn
{
width
:
92%
;
height
:
8rem
;
.pay_btn
{
width
:
92%
;
height
:
8rem
;
background-color
:
#EE4454
;
color
:
#fff
;
font-size
:
2.5rem
;
color
:
#fff
;
font-size
:
2.5rem
;
outline
:
none
;
border
:
0
;
border
:
0
;
border-radius
:
1.5rem
;
}
.layui-layer-content
{
font-size
:
1.8rem
!important
;
padding
:
2rem
1rem
!important
;
.layui-layer-content
{
font-size
:
1.8rem
!important
;
padding
:
2rem
1rem
!important
;
}
</style>
...
...
@@ -114,11 +155,11 @@
</div>
<div
class=
"pay_zhifu"
>
<img
class=
"pay_one"
src=
"../images/login/wechat.png"
alt=
""
/>
<img
class=
"pay_one"
src=
"../images/login/wechat.png"
alt=
""
/>
<span
class=
"pay_two"
>
微信支付
</span>
<div
class=
"pay_three"
>
<!-- <div class="pay_circle"></div> -->
<img
src=
"../images/login/checkbox.png"
aly=
""
/>
<img
src=
"../images/login/checkbox.png"
aly=
""
/>
</div>
</div>
</div>
...
...
@@ -133,33 +174,34 @@
<script
src=
"../js/md5.js"
></script>
<script>
$
(
function
(){
if
(
sessionStorage
.
getItem
(
"payInfo"
))
{
$
(
function
()
{
if
(
sessionStorage
.
getItem
(
"payInfo"
))
{
let
msgList
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"payInfo"
));
$
(
"#pay_money"
).
html
(
msgList
.
dTotalPrice
);
$
(
".pay_quan"
).
html
(
msgList
.
sProductName
);
}
countdown
();
})
var
second
=
180000
;
var
payBtn
=
true
;
var
changesecond
=
''
;
var
second
=
180000
;
var
payBtn
=
true
;
var
changesecond
=
''
;
//倒计时
function
countdown
()
{
if
(
second
==
0
)
{
payBtn
=
false
;
changesecond
=
'00:00'
;
payBtn
=
false
;
changesecond
=
'00:00'
;
$
(
".daojishi"
).
html
(
changesecond
);
return
;
}
var
time
=
setTimeout
(
function
()
{
let
str
=
formatSeconds
(
second
);
second
=
second
-
1
;
changesecond
=
str
;
second
=
second
-
1
;
changesecond
=
str
;
$
(
".daojishi"
).
html
(
changesecond
);
countdown
();
},
1000
)
};
function
formatSeconds
(
value
)
{
var
theTime
=
parseInt
(
value
);
// 秒
var
theTime1
=
0
;
// 分
...
...
@@ -185,53 +227,54 @@
return
result
;
};
function
pay
()
{
if
(
!
localStorage
.
openid
)
{
function
pay
()
{
if
(
!
localStorage
.
openid
)
{
window
.
location
.
href
=
'http://activity.oytour.com/html/GT_activities.html'
;
}
if
(
!
payBtn
)
{
if
(
!
payBtn
)
{
layer
.
msg
(
'您已经超出支付时间!'
);
}
var
payMsg
;
if
(
sessionStorage
.
getItem
(
"payInfo"
))
{
if
(
sessionStorage
.
getItem
(
"payInfo"
))
{
payMsg
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"payInfo"
));
}
let
msg
=
{
sOrderNo
:
payMsg
.
sOrderNo
,
//订单号
dTotalPrice
:
payMsg
.
dTotalPrice
,
//总价
sProductName
:
payMsg
.
sProductName
,
sCurOpenID
:
localStorage
.
openid
let
msg
=
{
sOrderNo
:
payMsg
.
sOrderNo
,
//订单号
dTotalPrice
:
payMsg
.
dTotalPrice
,
//总价
sProductName
:
payMsg
.
sProductName
,
sCurOpenID
:
localStorage
.
openid
}
$
.
ajax
({
type
:
"POST"
,
url
:
`https://reborn.oytour.com/api/WeChatNotify/
WechatOpenId?sOrderNo=
${
payMsg
.
sOrderNo
}
&sCurOpenID=
${
localStorage
.
openid
}
&domainName=http://reborn.oytour.com/api/WeChatNotify/DoPay
`
,
url
:
`https://reborn.oytour.com/api/WeChatNotify/
DoPay?sOrderNo=
${
payMsg
.
sOrderNo
}
&sCurOpenID=
${
localStorage
.
openid
}
`
,
contentType
:
"application/json"
,
async
:
false
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
resultCode
===
1
)
{
let
d
=
JSON
.
parse
(
res
.
data
);
onBridgeReady
(
d
.
appId
,
d
.
timeStamp
,
d
.
nonceStr
,
d
.
package
,
d
.
payS
ign
);
}
else
{
let
d
=
JSON
.
parse
(
res
.
data
);
onBridgeReady
(
d
.
appId
,
d
.
timeStamp
,
d
.
nonceStr
,
d
.
package
,
d
.
s
ign
);
}
else
{
layer
.
msg
(
res
.
message
);
}
},
error
:
function
(
res
)
{
error
:
function
(
res
)
{
// layer.msg(res.message);
}
});
if
(
typeof
WeixinJSBridge
==
"undefined"
){
if
(
document
.
addEventListener
)
{
if
(
typeof
WeixinJSBridge
==
"undefined"
)
{
if
(
document
.
addEventListener
)
{
document
.
addEventListener
(
'WeixinJSBridgeReady'
,
onBridgeReady
,
false
);
}
else
if
(
document
.
attachEvent
)
{
}
else
if
(
document
.
attachEvent
)
{
document
.
attachEvent
(
'WeixinJSBridgeReady'
,
onBridgeReady
);
document
.
attachEvent
(
'onWeixinJSBridgeReady'
,
onBridgeReady
);
}
}
else
{
}
else
{
// onBridgeReady();
}
}
function
onBridgeReady
(
id
,
ts
,
ns
,
pa
,
ps
)
{
function
onBridgeReady
(
id
,
ts
,
ns
,
pa
,
ps
)
{
WeixinJSBridge
.
invoke
(
'getBrandWCPayRequest'
,
{
"appId"
:
id
,
//公众号名称,由商户传入
...
...
@@ -241,7 +284,7 @@
"signType"
:
"MD5"
,
//微信签名方式:
"paySign"
:
ps
//微信签名
},
function
(
res
)
{
function
(
res
)
{
if
(
res
.
err_msg
==
"get_brand_wcpay_request:ok"
)
{
// 使用以上方式判断前端返回,微信团队郑重提示:
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
...
...
@@ -250,4 +293,5 @@
});
}
</script>
</html>
\ No newline at end of file
js/jquery.dataStatistics.js
View file @
cbf01efa
This diff is collapsed.
Click to expand it.
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