Commit 4c2e8331c9ecb14122249ab9574da1e142fd9cba
1 parent
ea5fab32
黄石扫码支付
Showing
7 changed files
with
83 additions
and
5 deletions
img/default.png
0 → 100644
2.08 KB
img/no.png
0 → 100644
19.2 KB
img/ok.png
0 → 100644
29 KB
js/config.js
... | ... | @@ -7,11 +7,11 @@ window.webAppH5 = {}; |
7 | 7 | |
8 | 8 | |
9 | 9 | /*服务器地址*/ |
10 | -var webAppRoot = "http://pay.service.renniting.cn/v1"; | |
10 | +var webAppRoot = "http://pay.service.huangshiparking.com"; | |
11 | 11 | //test 测试环境 |
12 | 12 | // var webAppRoot = "http://39.98.54.240:8090"; |
13 | 13 | //微信支付结果回调地址 |
14 | -var webAppPayResult = "http://wxgzh.renniting.cn/wechatwuxi/DEV/Threewf/codepay/page/wxpayResult.html"; | |
14 | +var webAppPayResult = "http://wxgzh.huangshiparking.com/HSwechat/PDA-Payment/wxpayResult.html"; | |
15 | 15 | |
16 | 16 | /*公共参数*/ |
17 | 17 | webAppH5.comParams = { | ... | ... |
js/url.js
... | ... | @@ -89,7 +89,7 @@ mUrl.getJx = function(){ |
89 | 89 | |
90 | 90 | // var cepath = 'http://39.98.54.240:8090'; |
91 | 91 | |
92 | -var cepath = 'http://pay.service.renniting.cn/v1'; | |
92 | +var cepath = 'http://pay.service.huangshiparking.com'; | |
93 | 93 | // http://pay.service.renniting.cn |
94 | 94 | // var cepath = 'http://39.98.54.240:8090' |
95 | 95 | // http://app.api.dyszt.com:8090 | ... | ... |
out.html
... | ... | @@ -15,8 +15,8 @@ |
15 | 15 | <meta http-equiv="Expires" content="0"> |
16 | 16 | <link rel="stylesheet" href="css/reset.css?v=0.1"> |
17 | 17 | <link rel="stylesheet" href="css/provinceKey.css?v=0.1"> |
18 | - <script src="js/config.js"></script> | |
19 | - <script src="js/common.js?v=0.01"></script> | |
18 | + <script src="js/config.js?a=111"></script> | |
19 | + <script src="js/common.js?j=0.01"></script> | |
20 | 20 | <!-- |
21 | 21 | Notice the use of %PUBLIC_URL% in the tags above. |
22 | 22 | It will be replaced with the URL of the `public` folder during the build. | ... | ... |
wxpayResult.html
0 → 100644
1 | +<!doctype html> | |
2 | +<html lang="en"> | |
3 | +<head> | |
4 | + <meta charset="utf-8"> | |
5 | + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
6 | + <meta name="theme-color" content="#000000"> | |
7 | + <meta name="google" value="notranslate"> | |
8 | + <meta name="format-detection" content="telephone=no"> | |
9 | + <meta name="format-detection" content="email=no"> | |
10 | + <meta name="apple-mobile-web-app-capable" content="yes"> | |
11 | + <meta name="apple-mobile-web-app-status-bar-style" content="black"> | |
12 | + <meta http-equiv="Pragma" content="no-cache"> | |
13 | + <meta http-equiv="Cache-control" content="no-cache"> | |
14 | + <meta http-equiv="Cache" content="no-cache"> | |
15 | + <meta http-equiv="Expires" content="0"> | |
16 | + <script src="js/common.js"></script> | |
17 | + <!-- | |
18 | + Notice the use of %PUBLIC_URL% in the tags above. | |
19 | + It will be replaced with the URL of the `public` folder during the build. | |
20 | + Only files inside the `public` folder can be referenced from the HTML. | |
21 | + | |
22 | + Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will | |
23 | + work correctly both with client-side routing and a non-root public URL. | |
24 | + Learn how to configure a non-root public URL by running `npm run build`. | |
25 | + --> | |
26 | + <title>支付状态</title> | |
27 | +</head> | |
28 | +<body style="background-color: #f0f4f5;"> | |
29 | +<!--<noscript>--> | |
30 | +<!--You need to enable JavaScript to run this app.--> | |
31 | +<!--</noscript>--> | |
32 | +<header id="header" style="margin-top:25%; display: flex; justify-content: center; align-items: center; flex-direction: column; "> | |
33 | + <img id="stateImg" src="img/default.png" style="width: 64px; height: 64px; " /> | |
34 | + <div id="stateLable" style="font-size: 18px; color: #777; margin-top: 20px;">状态</div> | |
35 | +</header> | |
36 | + | |
37 | +<!-- | |
38 | + This HTML file is a template. | |
39 | + If you open it directly in the browser, you will see an empty page. | |
40 | + | |
41 | + You can add webfonts, meta tags, or analytics to this file. | |
42 | + The build step will place the bundled scripts into the <body> tag. | |
43 | + | |
44 | + To begin the development, run `npm start` or `yarn start`. | |
45 | + To create a production bundle, use `npm run build` or `yarn build`. | |
46 | +--> | |
47 | +<script type="text/javascript"> | |
48 | +window.onload = function () { | |
49 | + var tmpParams = getQueryString(window.location); | |
50 | + if (tmpParams != null) { | |
51 | + console.log(JSON.stringify(tmpParams)); | |
52 | + if (tmpParams.trade_no == "success") { | |
53 | + getResponse("success"); | |
54 | + } else { | |
55 | + getResponse("fail"); | |
56 | + } | |
57 | + //alertMsg("支付返回参数:" + JSON.stringify(tmpParams)); | |
58 | + } else { | |
59 | + console.log("支付返回参数" + tmpParams); | |
60 | + } | |
61 | +} | |
62 | +//type[fail、sucesss] | |
63 | +function getResponse(type) { | |
64 | + var img = document.getElementById("stateImg"); | |
65 | + var label = document.getElementById("stateLable"); | |
66 | + if (type == "fail") { | |
67 | + img.src = "img/no.png"; | |
68 | + label.innerHTML = "支付失败,尝试重新扫码"; | |
69 | + } else { | |
70 | + img.src = "img/ok.png"; | |
71 | + label.innerHTML = "订单支付成功"; | |
72 | + } | |
73 | +} | |
74 | +</script> | |
75 | +</body> | |
76 | + | |
77 | + | |
78 | +</html> | ... | ... |