Commit 0a2d5088cafc801acf996bde05df77c95ae3f379
1 parent
28b899c8
不是我的车牌跳转
Showing
6 changed files
with
785 additions
and
1 deletions
css/provinceKey.css
0 → 100644
1 | +/* | |
2 | + songcx | |
3 | + 2018-12-18 | |
4 | +*/ | |
5 | + | |
6 | +.label_province{ | |
7 | + position:absolute; | |
8 | + top:6px; | |
9 | + left:10px; | |
10 | + } | |
11 | + .input_province{ | |
12 | + position:absolute; | |
13 | + text-align:center; | |
14 | + width:26px; | |
15 | + left:8px; | |
16 | + top:8px; | |
17 | + border:none; | |
18 | + outline:0; | |
19 | + font-family:"黑体"; | |
20 | + } | |
21 | + .input_font{ | |
22 | + font-size:18px; | |
23 | + color:#333333; | |
24 | + } | |
25 | + .input_font_plate{ | |
26 | + font-size:14px; | |
27 | + color:#333333; | |
28 | + } | |
29 | + .input_platenumber_base{ | |
30 | + position:absolute; | |
31 | + text-align:center; | |
32 | + width:34px; | |
33 | + top:13px; | |
34 | + border:none; | |
35 | + outline:0; | |
36 | + } | |
37 | + .input_city{ | |
38 | + left:44px; | |
39 | + } | |
40 | + | |
41 | + .label_platenumber{ | |
42 | + font-size:14px; | |
43 | + color:#999; | |
44 | + width:265px; | |
45 | + text-align:center; | |
46 | + margin-top:29px; | |
47 | + border:0; | |
48 | + outline:0; | |
49 | + } | |
50 | + | |
51 | + .input_park{ | |
52 | + font-size:14px; | |
53 | + color:#666; | |
54 | + width:265px; | |
55 | + text-align:center; | |
56 | + border:0; | |
57 | + outline:0; | |
58 | + } | |
59 | + | |
60 | + .label_btntext_confirm{ | |
61 | + position:absolute; | |
62 | + top:12px; | |
63 | + font-size:16px; | |
64 | + width:214px; | |
65 | + left:0; | |
66 | + } | |
67 | + .label_btn_text{ | |
68 | + text-align:center; | |
69 | + color:#FFF; | |
70 | + /* font-weight:bold; */ | |
71 | + } | |
72 | + | |
73 | + .key_province{ | |
74 | + font-size:17px; | |
75 | + position:absolute; | |
76 | + left:2.5px; | |
77 | + top:8px; | |
78 | + border:0; | |
79 | + width:28px; | |
80 | + text-align:center; | |
81 | + font-family:"黑体"; | |
82 | + } | |
83 | + | |
84 | +#id_keyboard_province { | |
85 | + position:absolute; | |
86 | + bottom:0px; | |
87 | +} | |
0 | 88 | \ No newline at end of file | ... | ... |
js/config.js
... | ... | @@ -102,4 +102,27 @@ webAppH5.zeroPayServer = "/appAccountPay/zeroPay"; |
102 | 102 | //http://localhost:1260/pay.html?orderId=101526715300086198272&parkName=%E9%9D%99%E9%9B%85%E5%9C%B0%E4%B8%8A&parkCode=B1504020C7&inparktime=2018-12-24%2010%3A58%3A24&outtime=2018-12-24%2011%3A05%3A10&staytime=420&due=70&paid=0&orderTotalFee=70&orderFee=7&discountFee=63&plateno=%E8%92%99DTK366&outPayOrderNo=B1504020C720181224110510813DTK366-172192102&appOrderTimeout=%E8%AF%B7%E5%9C%A8%E6%94%AF%E4%BB%98%E5%AE%8C%E6%88%9010%E5%88%86%E9%92%9F%E5%86%85%E5%87%BA%E5%9C%BA%EF%BC%8C%E5%A6%82%E8%B6%85%E6%97%B6%E6%9C%AA%E5%87%BA%E5%9C%BA%EF%BC%8C%E4%BC%9A%E7%BB%A7%E7%BB%AD%E8%AE%A1%E8%B4%B9%E3%80%82&discountDesc=1%E6%8A%98%E4%BC%98%E6%83%A0&queryOrderInfo=%7B%22app_id%22%3A%221%22%2C%22carNumber%22%3A%22%E8%92%99DTK366%22%2C%22channelId%22%3A%22172192102%22%2C%22codeType%22%3A0%2C%22deviceInfo%22%3A%223%22%2C%22direction%22%3A1%2C%22parkingId%22%3A%22B1504020C7%22%2C%22plNo%22%3A%22B1504020C7%22%2C%22salt%22%3A%222%22%2C%22sign%22%3A%224%22%2C%22sign_type%22%3A%22md5%22%2C%22terminalSource%22%3A%227%22%2C%22token%22%3A%22666%22%7D&needPay=true |
103 | 103 | |
104 | 104 | |
105 | +function IsWeixinOrAlipay(){ | |
106 | + // | |
107 | + // var ua = window.navigator.userAgent; | |
108 | + // //判断是不是微信 | |
109 | + // if ( ua.indexOf("MicroMessenger") > 0 ) { | |
110 | + // return 4; | |
111 | + // } | |
112 | + // //判断是不是支付宝 | |
113 | + // if (ua.indexOf("Alipayclient") > 0) { | |
114 | + // return 1; | |
115 | + // } | |
116 | + // //哪个都不 | |
117 | + // return "false"; | |
118 | + var clientType = clientBrowserEx(); | |
119 | + if(clientType=='wxPay'){ | |
120 | + return 4 | |
121 | + }else if(clientType=='aliPay'){ | |
122 | + return 1 | |
123 | + }else { | |
124 | + return 1 | |
125 | + } | |
126 | +} | |
127 | + | |
105 | 128 | ... | ... |
js/list.js
... | ... | @@ -444,7 +444,8 @@ function getMd5sign() |
444 | 444 | |
445 | 445 | |
446 | 446 | $('.outBtn').on('click',function () { |
447 | - window.location.href = 'http://wxgzh.renniting.cn/wechatwuxi/Chifeng/Threewf/stoppayment/select.html' | |
447 | + //window.location.href = 'http://wxgzh.renniting.cn/wechatwuxi/Chifeng/Threewf/stoppayment/select.html' | |
448 | + window.location.href = 'http://wxgzh.renniting.cn/wechatwuxi/DEV/PDA-Payment/out.html' | |
448 | 449 | |
449 | 450 | }) |
450 | 451 | $('.hiddenBtn').on('click',function () { | ... | ... |
js/provinceKey.js
0 → 100644
1 | +var provinces = new Array("京", "沪", "浙", "苏", "粤", "鲁", "晋", "冀", | |
2 | + "豫", "川", "渝", "辽", "吉", "黑", "皖", "鄂", | |
3 | + "津", "贵", "云", "桂", "琼", "青", "新", "藏", | |
4 | + "蒙", "宁", "甘", "陕", "闽", "赣", "湘","X"); | |
5 | +function provinceSelect() { | |
6 | + showProvince(); | |
7 | +} | |
8 | +function parkSelect() { | |
9 | + | |
10 | + alert("选择停车场"); | |
11 | +} | |
12 | +function confirm() { | |
13 | + | |
14 | + alert("确定"); | |
15 | +} | |
16 | + | |
17 | +function showProvince() { | |
18 | + var screenWidth = window.screen.width; | |
19 | + //求出列数,向下取整 | |
20 | + var columns = Math.floor((screenWidth - 9) / 42); | |
21 | + //求出行数,向上取整 | |
22 | + var rows = Math.ceil(31 / columns); | |
23 | + //算出按键背景的高度,为每个按键的高度+间隔+上下边距,48为每个按键的高度+距下一个按键的距离 | |
24 | + var key_bg_height = rows * 48 + 16; | |
25 | + var x_space = (screenWidth - 9 - 42 * columns) / (columns); | |
26 | + var start_x = 9 + x_space; | |
27 | + var start_y = 12; | |
28 | + var keyboard_province = document.getElementById("id_keyboard_province"); | |
29 | + keyboard_province.style.position = "absolute";//fixed absolute | |
30 | + keyboard_province.style.bottom = "0px"; | |
31 | + //keyboard_province.style.top = (window.screen.height - key_bg_height) + "px"; | |
32 | + keyboard_province.style.left = 0; | |
33 | + keyboard_province.style.backgroundColor = "#f2f2f2"; | |
34 | + keyboard_province.style.width = "100%"; | |
35 | + keyboard_province.style.height = key_bg_height + "px"; | |
36 | + //keyboard_province.style.display="block"; | |
37 | + keyboard_province.innerHTML = ''; | |
38 | + | |
39 | + for (var i = 0; i < rows; i++) { | |
40 | + for (var j = 0; j < columns; j++) { | |
41 | + var provinceIds = i * columns + j; | |
42 | + if (provinceIds < provinces.length) { | |
43 | + var x = 9 + (j + 1) * x_space + j * 42; | |
44 | + var y = 12 + i * 48; | |
45 | + /* var addHtml = addKeyProvince(x,y,provinceIds); | |
46 | + alert(addHtml); */ | |
47 | + $("#id_keyboard_province").append(addKeyProvince(x, y, provinceIds)); | |
48 | + } | |
49 | + else { | |
50 | + keyboard_province.style.display = "block"; | |
51 | + return; | |
52 | + } | |
53 | + } | |
54 | + } | |
55 | + //var tmpClose = "<div style='width:32px;height:32px;'>X</div>"; | |
56 | + //$("#id_keyboard_province").append(tmpClose); | |
57 | + | |
58 | +} | |
59 | + | |
60 | +function addKeyProvince(x, y, provinceIds) { | |
61 | + | |
62 | + var addHtml = '<div style="position:absolute;left:' + x + 'px;top:' + y + 'px;width:42px;height:48px;">'; | |
63 | + addHtml += '<label for="id_' + provinceIds + '"></label>'; | |
64 | + addHtml += '<input id="id_' + provinceIds + '" type="text" readonly="readonly" class="key_province" value="' + provinces[provinceIds] + '" onclick="chooseProvince(this.value);">'; | |
65 | + addHtml += '</div>'; | |
66 | + return addHtml; | |
67 | +} | |
68 | + | |
69 | + | |
70 | +function chooseProvince(province) { | |
71 | + /* alert(province+"======"+provinces[7]); */ | |
72 | + if (province == "X") { | |
73 | + $("#id_keyboard_province").hide(); | |
74 | + } else { | |
75 | + document.getElementById("selProvince").value = province; | |
76 | + $("#id_keyboard_province").hide(); | |
77 | + } | |
78 | +} | |
0 | 79 | \ No newline at end of file | ... | ... |
listnew.html
0 → 100644
1 | +<!DOCTYPE html> | |
2 | +<html lang="en"> | |
3 | +<head> | |
4 | + <meta charset="UTF-8"> | |
5 | + <title>列表详情</title> | |
6 | + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> | |
7 | + <meta name="format-detection" content="telephone=no"/> | |
8 | + <meta name="format-detection" content="email=no"/> | |
9 | + <meta name="apple-mobile-web-app-status-bar-style" content="black"/> | |
10 | + <meta name="apple-mobile-web-app-capable" content="yes"/> | |
11 | + <meta name="apple-mobile-web-app-title" content=""> | |
12 | + <meta name="google" value="notranslate"><!-- 禁止Chrome 浏览器中自动提示翻译 --> | |
13 | + <link rel="apple-touch-icon-precomposed" href="favicon.ico"> | |
14 | + <link rel="shortcut icon" href="favicon.ico"> | |
15 | + <link rel="Bookmark" href="favicon.ico"> | |
16 | + <meta http-equiv="Pragma" content="no-cache" /> | |
17 | + | |
18 | + <meta http-equiv="Expires" content="0" /> | |
19 | + | |
20 | + <link rel="stylesheet" href="//cdn.bootcss.com/weui/1.1.1/style/weui.min.css"> | |
21 | + <link rel="stylesheet" href="//cdn.bootcss.com/jquery-weui/1.0.1/css/jquery-weui.min.css"> | |
22 | + <link rel="stylesheet" href="css/reset.css"> | |
23 | + | |
24 | + <style> | |
25 | + .all_told, .platen_number { | |
26 | + text-align: center; | |
27 | + } | |
28 | + .all_told { | |
29 | + padding: 30px 0 10px 0; | |
30 | + } | |
31 | + .all_told span { | |
32 | + margin-right: 5px; | |
33 | + font-size: 22px; | |
34 | + } | |
35 | + .discount_money { | |
36 | + color: #fc3817; | |
37 | + } | |
38 | + .discount { | |
39 | + padding: 4px 7px; | |
40 | + background: #fc3817; | |
41 | + border-radius: 2px; | |
42 | + position: relative; | |
43 | + margin-left: 10px; | |
44 | + color: #fff; | |
45 | + } | |
46 | + .discount:before { | |
47 | + position: absolute; | |
48 | + content: ''; | |
49 | + width: 0; | |
50 | + height: 0; | |
51 | + left: -6px; | |
52 | + top: 8px; | |
53 | + border-top: 6px solid transparent; | |
54 | + border-bottom: 6px solid transparent; | |
55 | + border-right: 6px solid #fc3817; | |
56 | + } | |
57 | + .youhuid{ | |
58 | + background: #f00; | |
59 | + color: #fff; | |
60 | + font-size: 13px; | |
61 | + padding:2px 5px; | |
62 | + border-radius: 3px; | |
63 | + margin-left: 2px; | |
64 | + display: none; | |
65 | + } | |
66 | + .showTooltips{ | |
67 | + display: none; | |
68 | + /*针对苹果新增手势*/ | |
69 | + cursor: pointer; | |
70 | + } | |
71 | + .weui-cells{ | |
72 | + /*针对苹果新增手势*/ | |
73 | + cursor: pointer; | |
74 | + } | |
75 | + .dialog-out{ | |
76 | + position: absolute; | |
77 | + width: 100%; | |
78 | + height: 100%; | |
79 | + top:0; | |
80 | + right: 0; | |
81 | + left: 0; | |
82 | + bottom: 0; | |
83 | + z-index: 1000; | |
84 | + background: rgba(0,0,0,.3); | |
85 | + display: none; | |
86 | + } | |
87 | + .dia-con{ | |
88 | + width: 305px; | |
89 | + height: 138px; | |
90 | + padding: 10px ; | |
91 | + background:rgba(255,255,255,1); | |
92 | + border-radius:8px; | |
93 | + position: absolute; | |
94 | + left: 50%; | |
95 | + top:50%; | |
96 | + transform: translate(-50%,-50%); | |
97 | + } | |
98 | + .close-btn{ | |
99 | + float: right; | |
100 | + width: 16px; | |
101 | + height: 16px; | |
102 | + background: url("img/close.png") no-repeat; | |
103 | + background-size: 100% 100%; | |
104 | + cursor: pointer; | |
105 | + overflow: hidden; | |
106 | + } | |
107 | + .dia-main{ | |
108 | + margin-left: 30px; | |
109 | + margin-top: 30px; | |
110 | + height: 52px; | |
111 | + padding-left: 90px; | |
112 | + background: url("img/out.png") no-repeat; | |
113 | + background-size: 52px 52px; | |
114 | + } | |
115 | + .dia-text{ | |
116 | + padding-top: 20px; | |
117 | + text-align: center; | |
118 | + font-size: 12px; | |
119 | + color: #999; | |
120 | + } | |
121 | + .arrears-btn{ | |
122 | + width: 70px; | |
123 | + height: 25px; | |
124 | + margin-top: 20px; | |
125 | + color: #FFF; | |
126 | + font-size: 12px; | |
127 | + text-align: center; | |
128 | + line-height: 25px; | |
129 | + background: url("img/arrears-bg.png") no-repeat; | |
130 | + background-size:70px 25px ; | |
131 | + } | |
132 | + | |
133 | + .strTip{ | |
134 | + width: 100%; | |
135 | + height: 100%; | |
136 | + text-align: center; | |
137 | + font-size: 20px; | |
138 | + background: rgba(0,0,0,.7); | |
139 | + position: fixed; | |
140 | + top:0; | |
141 | + left: 0; | |
142 | + } | |
143 | + .strWrap{ | |
144 | + width: 80%; | |
145 | + background: #fff; | |
146 | + border-radius: 4px; | |
147 | + margin: 50px auto 0; | |
148 | + padding: 0 10px 15px; | |
149 | + } | |
150 | + .strCon{ | |
151 | + text-align: center; | |
152 | + font-size: 20px; | |
153 | + color: #333; | |
154 | + text-align: center; | |
155 | + } | |
156 | + .header-title{ | |
157 | + padding: 15px 0; | |
158 | + font-size: 14px; | |
159 | + font-weight: 600; | |
160 | + border-bottom:1px solid #ccc ; | |
161 | + color: #333; | |
162 | + } | |
163 | + .payCarNum{ | |
164 | + font-size: 16px; | |
165 | + color: #D40202; | |
166 | + } | |
167 | + .btn{ | |
168 | + color: #fff; | |
169 | + font-size: 20px; | |
170 | + | |
171 | + height: 40px; | |
172 | + line-height: 40px; | |
173 | + border-radius: 8px; | |
174 | + cursor: pointer; | |
175 | + } | |
176 | + .hiddenBtn{ | |
177 | + background: #79cbbf; | |
178 | + } | |
179 | + .outBtn{ | |
180 | + background: #509f93; | |
181 | + } | |
182 | + | |
183 | + </style> | |
184 | +</head> | |
185 | +<body ontouchstart=""> | |
186 | +<div id="tip-title" class="weui-cells__title" style="color: #f00;text-align: center">48小时限时补缴优惠</div> | |
187 | +<div id="pay_listcont"> | |
188 | + | |
189 | +</div> | |
190 | + | |
191 | + | |
192 | +<div class="pay-content-padded"> | |
193 | + <a class="weui-btn weui-btn_primary showTooltips" href="javascript:" id="showTooltips" v-cloak="showTooltips">申请离场</a> | |
194 | +</div> | |
195 | + | |
196 | +<div class="dialog-out"> | |
197 | + <div class="dia-con"> | |
198 | + <div class="close-btn"></div> | |
199 | + <div class="layui-clear"></div> | |
200 | + <div class="dia-main"> | |
201 | + <p>您已经成功申请离场</p> | |
202 | + <p>期待您的再次光临</p> | |
203 | + </div> | |
204 | + <div class="dia-text">温馨提示:请尽快出场,超过时间将重新计费哦!</div> | |
205 | + </div> | |
206 | +</div> | |
207 | + | |
208 | +<!--<div class="strTip" id="strTip">--> | |
209 | + <!--<div class="strWrap">--> | |
210 | + <!--<div class="header-title">车牌号码确认信息提示</div>--> | |
211 | + <!--<div style="font-size: 13px;color: #333;padding: 15px 0;">请确认您当前缴费的车牌号码</div>--> | |
212 | + <!--<div class="strCon"><span class="payCarNum" id="payCarNum"></span></div>--> | |
213 | + <!--<div class="btn hiddenBtn" style="margin: 15px 0">是我的车,去支付</div>--> | |
214 | + <!--<div class="btn outBtn">不是我的车,手动输入车牌号</div>--> | |
215 | + <!--</div>--> | |
216 | +<!--</div>--> | |
217 | + | |
218 | + | |
219 | + | |
220 | + | |
221 | +<script src="js/jquery-3.2.1.min.js"></script> | |
222 | +<script src="//cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script> | |
223 | +<script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/jquery-weui.min.js"></script> | |
224 | + | |
225 | +<script src="js/md5.min.js"></script> | |
226 | + | |
227 | +<script src="js/url.js?a=1.11"></script> | |
228 | +<script src="js/ajax.js"></script> | |
229 | +<script type="text/javascript"> | |
230 | +//微信浏览器中,aler弹框不显示域名 | |
231 | +(function(){ | |
232 | + //先判断是否为微信浏览器 | |
233 | + var ua = window.navigator.userAgent.toLowerCase(); | |
234 | + if (ua.match(/MicroMessenger/i) == 'micromessenger') { | |
235 | + //重写alert方法,alert()方法重写,不能传多余参数 | |
236 | + window.alert = function(name){ | |
237 | + var iframe = document.createElement("IFRAME"); | |
238 | + iframe.style.display="none"; | |
239 | + iframe.setAttribute("src", 'data:text/plain'); | |
240 | + document.documentElement.appendChild(iframe); | |
241 | + window.frames[0].window.alert(name); | |
242 | + iframe.parentNode.removeChild(iframe); | |
243 | + } | |
244 | + } | |
245 | +})(); | |
246 | +</script> | |
247 | +<script src="js/list.js?b=11141.31"></script> | |
248 | +</body> | |
249 | +</html> | ... | ... |
out.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 | + <link rel="stylesheet" href="css/reset.css?v=0.1"> | |
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> | |
20 | + <!-- | |
21 | + Notice the use of %PUBLIC_URL% in the tags above. | |
22 | + It will be replaced with the URL of the `public` folder during the build. | |
23 | + Only files inside the `public` folder can be referenced from the HTML. | |
24 | + | |
25 | + Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will | |
26 | + work correctly both with client-side routing and a non-root public URL. | |
27 | + Learn how to configure a non-root public URL by running `npm run build`. | |
28 | + --> | |
29 | + <title>扫码查询出场</title> | |
30 | + <style> | |
31 | + body { | |
32 | + background: #f0f4f5; | |
33 | + margin: 0; | |
34 | + padding: 0; | |
35 | + font-family: 'Microsoft YaHei'; | |
36 | + font-size:62.5%; /*1rem=10px*/ | |
37 | + } | |
38 | + #header { | |
39 | + margin-top: 25%; | |
40 | + display: flex; | |
41 | + justify-content: center; | |
42 | + align-items: center; | |
43 | + flex-direction: column; | |
44 | + } | |
45 | + | |
46 | + .phoneText { | |
47 | + font-size: 18px; | |
48 | + } | |
49 | + .inputBox { | |
50 | + position: relative; | |
51 | + font-size: 16px; | |
52 | + margin-top: 20px; | |
53 | + } | |
54 | + .subLabel { | |
55 | + position: absolute; | |
56 | + left: 0px; | |
57 | + top: 5px; | |
58 | + padding:5px; | |
59 | + } | |
60 | + .subLabel > span { | |
61 | + color: #5eb2c0; | |
62 | + } | |
63 | + #inputPhoneNum ,#inputCarNum{ | |
64 | + transition: all 0.30s ease-in-out; <!-- --> | |
65 | + -webkit-transition: all 0.30s ease-in-out; | |
66 | + -moz-transition: all 0.30s ease-in-out; | |
67 | + border: #c1bfc5 1px solid; | |
68 | + border-radius: 3px; | |
69 | + outline: none; | |
70 | + height: 30px; | |
71 | + width: 160px; | |
72 | + line-height: 30px; | |
73 | + padding: 5px; | |
74 | + padding-left: 60px; | |
75 | + font-size: 18px; | |
76 | + color:#ff6f16; | |
77 | + } | |
78 | + | |
79 | + #inputPhoneNum:focus { | |
80 | + box-shadow: 0 0 5px rgba(81, 203, 238, 1); | |
81 | + -webkit-box-shadow: 0 0 5px rgba(81, 203, 238, 1); | |
82 | + -moz-box-shadow: 0 0 5px rgba(81, 203, 238, 1); | |
83 | + } | |
84 | + .btnOK { | |
85 | + background:#75cbbe; | |
86 | + width: 230px; | |
87 | + height: 3rem; | |
88 | + line-height: 3rem; | |
89 | + text-align: center; | |
90 | + border-radius: 5px; | |
91 | + color: #ffffff; | |
92 | + font-size: 1.2rem; | |
93 | + cursor: pointer; | |
94 | + } | |
95 | + .flexBoxRow { | |
96 | + display: flex; | |
97 | + justify-content: left; | |
98 | + flex-direction:row; | |
99 | + align-items:center; | |
100 | + width:100%; | |
101 | + } | |
102 | + #footer { | |
103 | + justify-content:center !important; | |
104 | + padding-top:2rem; | |
105 | + } | |
106 | + | |
107 | + | |
108 | + | |
109 | + #tipResult { | |
110 | + display: none; | |
111 | + font-size: 2rem; | |
112 | + font-size: 20px; | |
113 | + color: #ff6f16; | |
114 | + margin-top: 25%; | |
115 | + text-align: center; | |
116 | + padding: 10px; | |
117 | + } | |
118 | + .input_province { | |
119 | + font-size:1.4rem; | |
120 | + } | |
121 | + .input_province:after { | |
122 | + content: " "; | |
123 | + position: absolute; | |
124 | + right: 0px; | |
125 | + top: 5px; | |
126 | + width: 1px; | |
127 | + height: 90%; | |
128 | + background: #5eb2c0; | |
129 | + } | |
130 | + #carNumBox { | |
131 | + position: relative; | |
132 | + } | |
133 | + .splitLine2 { | |
134 | + color: #5eb2c0; | |
135 | + position: absolute; | |
136 | + left: 40px; | |
137 | + bottom: 11px; | |
138 | + } | |
139 | + #exChangeNum { | |
140 | + margin-top: 1rem;cursor: pointer; | |
141 | + } | |
142 | + </style> | |
143 | +</head> | |
144 | +<body style="background-color: #f0f4f5;"> | |
145 | +<!--<noscript>--> | |
146 | +<!--You need to enable JavaScript to run this app.--> | |
147 | +<!--</noscript>--> | |
148 | +<header id="header" style="margin-top:20%; display: flex; justify-content: center; align-items: center; flex-direction: column; "> | |
149 | + <span class="phoneText" id="phoneText">请输入车牌号</span> | |
150 | + <div class="inputBox"> | |
151 | + <div id="phoneNumBox" style="display:none;"> | |
152 | + <div class="subLabel">+86 <span> |</span></div> | |
153 | + <input type="tel" id="inputPhoneNum" value="" onkeydown="inputDown();" placeholder="请输入手机号码" maxlength="14" onpaste="return false" style="display:block;" /> | |
154 | + </div> | |
155 | + <div id="carNumBox" style="display:block;" class="flexBoxRow"> | |
156 | + <input class="input_province" type="text" readonly="readonly" maxlength="1" id="selProvince" onclick="provinceSelect();" value="蒙"> | |
157 | + <span class="splitLine2"> |</span> | |
158 | + <input type="text" maxlength="10" name="inputCarNum" id="inputCarNum" /> | |
159 | + </div> | |
160 | + </div> | |
161 | + | |
162 | +</header> | |
163 | +<footer id="footer" class="flexBoxRow"> | |
164 | + <div class="btnOK" id="btnPayOK" disabled="disabled">获取订单</div> | |
165 | + <img src="img/loading.gif" id="loading" style="display: none;" /> | |
166 | +</footer> | |
167 | +<section id="tipResult" style="display:none;"> | |
168 | + <img src="img/by.png" style="width:220px;height:110px;"/> | |
169 | + <div id="outTipContent"></div> | |
170 | +</section> | |
171 | +<div id="id_keyboard_province"> </div> | |
172 | +<!-- | |
173 | + This HTML file is a template. | |
174 | + If you open it directly in the browser, you will see an empty page. | |
175 | + | |
176 | + You can add webfonts, meta tags, or analytics to this file. | |
177 | + The build step will place the bundled scripts into the <body> tag. | |
178 | + | |
179 | + To begin the development, run `npm start` or `yarn start`. | |
180 | + To create a production bundle, use `npm run build` or `yarn build`. | |
181 | +--> | |
182 | +<script type="text/javascript"> | |
183 | +var queryParams = null;//?参数名称 | |
184 | +var $btnObj = null, $btnLoad = null; | |
185 | +function inputDown() { | |
186 | + var numObj = getObjectByID("inputPhoneNum"); | |
187 | + numObj.value = numObj.value.replace(/\D/g, '').replace(/^/, '$& ').replace(/....(?!$)/g, '$& '); | |
188 | +} | |
189 | +window.onload = function () { | |
190 | + $btnObj = getObjectByID("btnPayOK"); | |
191 | + $btnLoad = getObjectByID("loading"); | |
192 | + $exChangeNum = getObjectByID("exChangeNum"); | |
193 | + // $exChangeNum.onclick = exChangeNumClick; | |
194 | + queryParams = getQueryString(window.location);//获取url参数?sign=4&token=6&codeType=888 | |
195 | + var ok = $btnObj; | |
196 | + ok.onclick = btnOkClick; | |
197 | + //初始化请求订单,有跳转选择支付,没有填入手机号 | |
198 | + $inputCarNum = getObjectByID("inputCarNum"); | |
199 | + $inputCarNum.onkeyup = checkCharAndNumber | |
200 | + //init();//初始化init | |
201 | +} | |
202 | +function init() { | |
203 | + if (queryParams == null) { | |
204 | + var str = "没有接收到请求参数"; alertMsg(str); console.log(str); return; | |
205 | + } | |
206 | + var params = queryParams || {}; | |
207 | + $btnObj.style.display = "none"; | |
208 | + $btnLoad.style.display = "block"; | |
209 | + params.payType = IsWeixinOrAlipay()//4:微信 1:支付宝 | |
210 | + params.terminalSource = "7";//1:任你听 3:微信公共号 4:云平台 7:H5 | |
211 | + //var tmpParams = Object.assign(params, window.webAppH5.comParams, window.webAppH5.appOut); | |
212 | + var tmpParams = Object.assign(params, window.webAppH5.comParams); | |
213 | + getRequest(webAppRoot + window.webAppH5.comServer, tmpParams, "init"); | |
214 | +} | |
215 | +//点击查询订单 | |
216 | +function btnOkClick() { | |
217 | + window.location.href = "listnew.html?carNumber=" + getCarNumber(); | |
218 | + | |
219 | + //var phoneNum = document.getElementById("inputPhoneNum").value.replace(/\s*/g, "");//去除空格 | |
220 | + if (queryParams == null) { | |
221 | + var str = "没有接收到请求参数"; alertMsg(str); console.log(str); return; | |
222 | + } | |
223 | + $btnObj.style.display = "none"; | |
224 | + $btnLoad.style.display = "block"; | |
225 | + var params = queryParams || {}; | |
226 | + //获取当前选中手机号或车牌号 | |
227 | + params.carNumber = getCarNumber();//手机号 | |
228 | + if (params.carNumber == "") { | |
229 | + $btnObj.style.display = "block"; $btnLoad.style.display = "none"; | |
230 | + return; | |
231 | + } | |
232 | + params.terminalSource = "7";//1:任你听 3:微信公共号 4:云平台 7:H5 | |
233 | + params.payType = IsWeixinOrAlipay()//4:微信 1:支付宝 | |
234 | + //var tmpParams = Object.assign(params, window.webAppH5.comParams, window.webAppH5.appOut); | |
235 | + var tmpParams = Object.assign(params, window.webAppH5.comParams); | |
236 | + getRequest(webAppRoot + window.webAppH5.comServer, tmpParams, "okClick"); | |
237 | +} | |
238 | + | |
239 | +//读取订单数据 | |
240 | +function getRequest(url, params, init) { | |
241 | + var btnObj = $btnObj; | |
242 | + postRequest(url, params, function (res) { | |
243 | + btnObj.style.display = "block"; | |
244 | + $btnLoad.style.display = "none"; | |
245 | + if (res.code == 0) {//进场 | |
246 | + //alertMsg("出场成功"); | |
247 | + if (res.data) { | |
248 | + var tmpObj = res.data; | |
249 | + //判断是否需要支付 | |
250 | + if (tmpObj.needPay) { | |
251 | + var queryParams = parseParams(tmpObj); | |
252 | + console.log(tmpObj) | |
253 | + window.location.href = "../listnew.html?carNumber" + queryParams; | |
254 | + } else { | |
255 | + var tipStr = "无需缴费,欢迎下次光临"; | |
256 | + sucessTip(tipStr); alertMsg(tipStr); | |
257 | + } | |
258 | + //var tel = document.getElementById("inputPhoneNum").value.replace(/\s/g, "");//去除空格 | |
259 | + //var orderFee = keepTwoDecimalFull((tmpObj.orderFee / 100));//本次出场实际应付金额(减去折扣,优惠券等之后的应付金额) | |
260 | + //var tmpUrl = "orderId=" + tmpObj.orderId + "&outtime=" + tmpObj.outtime + "&tel=" + tel + "&orderFee=" + orderFee; | |
261 | + | |
262 | + } else { | |
263 | + alertMsg("没有找到订单"); | |
264 | + } | |
265 | + } else {//其他情况如【该卡号场内已存在】 | |
266 | + console.log(res.message); alertMsg(res.message); | |
267 | + if ((init) != "init") { | |
268 | + alertMsg(res.message); | |
269 | + } | |
270 | + document.getElementById("inputPhoneNum").focus(); | |
271 | + } | |
272 | + }, function (err) { | |
273 | + console.log("网络服务超时..." + url); | |
274 | + alertMsg("网络服务超时"); | |
275 | + btnObj.style.display = "block"; | |
276 | + $btnLoad.style.display = "none"; | |
277 | + }); | |
278 | +} | |
279 | +//直接无需缴费出场 | |
280 | +function sucessTip(content) { | |
281 | + var obj = ["header", "footer"]; | |
282 | + for (var i = 0; i < obj.length; i++) { | |
283 | + var tmpObj = document.getElementById("" + obj[i] + ""); | |
284 | + tmpObj.style.display = "none"; | |
285 | + } | |
286 | + document.getElementById("tipResult").style.display = "block"; | |
287 | + document.getElementById("outTipContent").innerHTML = content; | |
288 | +} | |
289 | + | |
290 | + | |
291 | +//获取查询条件值 | |
292 | +function getCarNumber() { | |
293 | + // var tmpValue = ""; | |
294 | + // var tmpPhone = getObjectByID("inputPhoneNum"); | |
295 | + // var state = tmpPhone.style.display == "block" ? true : false; | |
296 | + // if (state) {//默认手机号 | |
297 | + // tmpValue = tmpPhone.value.replace(/\s*/g, "")+'111';//去除空格 | |
298 | + // if (tmpValue == "" || tmpValue.length < 11) { | |
299 | + // alertMsg("请输入正确的手机号码!"); | |
300 | + // tmpValue = ""; | |
301 | + // } | |
302 | + // } else {//车牌号 | |
303 | + // var tmpNum = getObjectByID("inputCarNum").value; | |
304 | + // tmpValue = getObjectByID("selProvince").value + tmpNum; | |
305 | + // if (tmpNum == "" || tmpNum == " ") { | |
306 | + // alertMsg("车牌号不能为空!"); | |
307 | + // tmpValue = ""; | |
308 | + // } | |
309 | + // | |
310 | + // | |
311 | + // | |
312 | + // } | |
313 | + // console.log("查询值:" + tmpValue); | |
314 | + // return tmpValue; | |
315 | + | |
316 | + | |
317 | + | |
318 | + var tmpValue = ""; | |
319 | + var tmpPhone = getObjectByID("inputPhoneNum"); | |
320 | + var phoneNumBox = getObjectByID("phoneNumBox");//手机号 | |
321 | + if(phoneNumBox.style.display === "block"){ | |
322 | + tmpValue = tmpPhone.value.replace(/\s*/g, "")+'111';//去除空格 | |
323 | + if (tmpValue == "" || tmpValue.length < 11) { | |
324 | + alertMsg("请输入正确的手机号码!"); | |
325 | + tmpValue = ""; | |
326 | + } | |
327 | + }else{ | |
328 | + var tmpNum = getObjectByID("inputCarNum").value; | |
329 | + tmpValue = getObjectByID("selProvince").value + tmpNum; | |
330 | + if (tmpNum == "" || tmpNum == " ") { | |
331 | + alertMsg("车牌号不能为空!"); | |
332 | + tmpValue = ""; | |
333 | + } | |
334 | + } | |
335 | + console.log("查询值:" + tmpValue); | |
336 | + return tmpValue; | |
337 | + | |
338 | +} | |
339 | +</script> | |
340 | + | |
341 | +<script src="js/jquery-3.2.1.min.js"></script> | |
342 | +<script src="js/provinceKey.js?v=0.1"></script> | |
343 | +</body> | |
344 | + | |
345 | + | |
346 | +</html> | ... | ... |