new_file.html
11.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title id="selecttitle">停车交费</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="format-detection" content="telephone=no" />
<meta name="format-detection" content="email=no" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="">
<meta name="google" value="notranslate"><!-- 禁止Chrome 浏览器中自动提示翻译 -->
<link rel="stylesheet" href="../../../iconfont/iconfont.css"/>
<!--<link rel="stylesheet" href="//cdn.bootcss.com/weui/1.1.1/style/weui.min.css?v=1.1">
<link rel="stylesheet" href="//cdn.bootcss.com/jquery-weui/1.0.1/css/jquery-weui.min.css?v=1.1">-->
<link rel="stylesheet" href="../../../js/bootstrap/bootstrap.css" />
<!--<link rel="stylesheet" href="../../../css/reset.css">-->
<link rel="stylesheet" href="../../../js/carsoft/carstyle.css"/>
<link rel="stylesheet" href="../css/fxcommon.css"/>
</head>
<style>
body,html{
height: 100%;
}
body{
box-sizing: border-box;
}
.addcp{
margin-top:37px;
padding: 0 26px;
}
.addcp .hhhd{
color: #fff;
text-align: center;
font-size: 17px;
padding: 15px 0 6px;
box-sizing: border-box;
}
.addbtnp{
width: 100%;
padding: 76px 57px 0;
box-sizing: border-box;
}
.addbtnp .addbtn{
width: 100%;
border-style: none;
height: 42px;
background: #fff;
color: #75CBBE;
border-radius: 21px;
font-size: 18px;
}
.sbzg{
width: 100%;
margin: 0 auto 10px;
/*padding: 8px 0;*/
box-sizing: border-box;
background: #fff;
border-radius: 6px;
text-align: center;
height: 47px;
line-height: 47px;
}
.sbzg>span{
display: inline-block;
width: 14.2%;
/*border-right: 1px solid #9B9B9B;*/
text-align: center;
padding:0 5px;
box-sizing: border-box;
height: 100%;
position: relative;
float: left;
}
.sbzgqh>span{
display: inline-block;
width: 12.5%;
/*border-right: 1px solid #9b9b9b;*/
text-align: center;
padding:0 5px;
box-sizing: border-box;
height: 100%;
}
.sbzg span>div{
height: 100%;
}
.sbzg .right{
height: 16px;
width: 1px;
background: rgba(232,231,231,1);
position: absolute;
right: 0;
top: 50%;
margin-top: -8px;
}
.sbzg>span:last-child .right{
display: none;
}
.sbzg .bottom{
position: absolute;
bottom: 5px;
left: 50%;
width: 23px;
height: 2px;
margin-left: -11.5px;
}
.sbzg>span.active .bottom{
background: #75cbbe;
}
.sbzg span>div.active{
/*border-bottom: 1px solid #75cbbe;
animation:mymove 1s infinite;
-webkit-animation:mymove 1s infinite;
animation-direction:alternate;
-webkit-animation-direction:alternate; */
}
.sbzg span:last-child{
border-right: 0;
}
@keyframes mymove
{
from {border-bottom: 1px solid rgba(255,255,255,0);}
to {border-bottom: 1px solid #75cbbe;}
}
.qiehuan{
width: 120px;
margin: 10px auto 30px;
color: #fff;
font-size: 12px;
text-align: center;
}
.qiehuan i{
font-size: 12px;
}
.hhhd{
color: #fff;
text-align: center;
font-size: 17px;
padding: 32px 0 10px;
box-sizing: border-box;
}
#historycarnum{
width: 100%;
display: block;
/*padding: 0 10px ;*/
box-sizing: border-box;
height: 38px;
text-align: center;
}
#historycarnum label{
width: 33%;
height: 37px;
overflow: hidden;
display: block;
float: left;
/*padding: 0 5px;*/
box-sizing: border-box;
margin-bottom: 10px;
}
#historycarnum label:first-child{
padding-right: 5px;
/*float: left;*/
/*text-align: left;*/
}
#historycarnum label:nth-child(2){
padding: 0 5px;
}
#historycarnum label:nth-child(3){
padding-left: 5px;
}
#historycarnum label div{
width: 100%;
float: left;
color: #75cbbe;
background: #fff;
text-align: center;
height: 37px;
line-height: 37px;
border-radius: 4px;
}
#historycarnum label div.active{
color: #fff;
background: #75cbbe;
}
.yibangdingcar{
width: 100%;
/*padding:0 10px ;*/
box-sizing: border-box;
}
.yibangdingcar>div{
width: 100%;
margin: 10px auto !important;
padding: 0 10px;
background: #fff;
height: 44px;
line-height: 44px;
color: #000;
border-radius: 3px;
}
.yibangdingcar>div>div{
padding: 0;
}
.yibangdingcar>div>div:last-child{
color: #9b9b9b;
font-size: 13px;
text-align: right;
}
.yibangdingcar>div>div:last-child i{
color: #9b9b9b;
font-size: 13px;
text-align: right;
}
.logo{
position: absolute;
bottom: 14px;
width: 100%;
left: 0;
}
.logo>div{
display: block !important;
}
.logo>div:last-child{
width: 100%;
}
.logo .imgss{
display: block;
margin: 0 auto;
text-align: center;
}
.logo .imgss img{
height: 32px;
}
.logo .imgss img:first-child{
margin-right: 9px;
}
.logo div:last-child{
width: 100%;
float: left;
text-align: center;
color: #fff;
margin-top: 25px;
}
</style>
<body ontouchstart >
<div class="fanxtctop">
<div class="row">
<div class="col-xs-12">
<i class="icon iconfont" onclick="vipback()"></i>
<span class="tt">停车交费</span>
</div>
</div>
</div>
<div class="addcp">
<div class="hhhd">请输入车牌号</div>
<div class="sbzg" id="carsoft">
<span class="active"><div></div><span class="right"></span><span class="bottom"></span></span><span><div></div><span class="right"></span><span class="bottom"></span></span><span><div></div><span class="right"></span><span class="bottom"></span></span><span><div></div><span class="right"></span><span class="bottom"></span></span><span><div></div><span class="right"></span><span class="bottom"></span></span><span><div></div><span class="right"></span><span class="bottom"></span></span><span><div></div><span class="right"></span><span class="bottom"></span></span>
</div>
<div class="qiehuan" id="qiehuan" onclick="qiehuan()">
<i class="icon iconfont"></i> 切换新能源车
</div>
<input class="weui-input carsoftinput" style="display: none;" id="input" type="text" placeholder="请输入正确的车牌号码" v-model="carnumer" maxlength="7">
</div>
<div class="addbtnp">
<button class="addbtn">
立即添加
</button>
</div>
<script src="../../../js/jquery-3.2.1.min.js"></script>
<script src="../../../js/bootstrap/bootstrap.js"></script>
<!--<script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/jquery-weui.min.js?v=1.1"></script>-->
<!--md5 start-->
<script src="../../../js/md5.min.js"></script>
<!--md5 end-->
<script src="../../../js/layui/layui/layui.js"></script>
<script src="../../../js/soft/layer.js"></script>
<script src="../../../js/carsoft/carsoft.js"></script>
<script src="../../../js/url.js"></script>
<script src="../../../js/ajax.js"></script>
<script type="text/javascript">
var func = {}
//切换新能源车
function qiehuan(){
if(!xinnengyuan){
console.log('执行切换');
$('#carsoft').append('<span><div></div></span>');
$('#carsoft').addClass('sbzgqh');
console.log('切换新能源 '+$.trim($('#carsoft').text()));
$('#input').val($.trim($('#carsoft').text()));
$('.qiehuan').html('<i class="icon iconfont"></i> 切换普通车牌');
xinnengyuan = true;
}else{
$('#carsoft').children('span:last-child').remove();
$('#carsoft').removeClass('sbzgqh');
console.log('切换普通 '+$.trim($('#carsoft').text()));
$('#input').val($.trim($('#carsoft').text()));
$('.qiehuan').html('<i class="icon iconfont"></i> 切换新能源车');
xinnengyuan = false;
}
}
$(function(){
//打开键盘
openprovice(1);
//点击立即添加
var sfsxny = false;
$('body').on('click','.addbtn',function(){
var carnn = $.trim($("#input").val());
//layui.use(['layer'], function(){});
if(carnn.length==8){
if(carnn.substring(0,1)!='W'){
if(carnn.substring(2,3)=='D'||carnn.substring(2,3)=='F'||carnn.substring(2,3)=='0'||carnn.substring(2,3)=='1'||carnn.substring(2,3)=='2'||carnn.substring(2,3)=='3'||carnn.substring(2,3)=='4'||carnn.substring(2,3)=='5'||carnn.substring(2,3)=='6'||carnn.substring(2,3)=='7'||carnn.substring(2,3)=='8'||carnn.substring(2,3)=='9'){
if(carnn.substring(4,5)=='0'||carnn.substring(4,5)=='1'||carnn.substring(4,5)=='2'||carnn.substring(4,5)=='3'||carnn.substring(4,5)=='4'||carnn.substring(4,5)=='5'||carnn.substring(4,5)=='6'||carnn.substring(4,5)=='7'||carnn.substring(4,5)=='8'||carnn.substring(4,5)=='9'){
if(carnn.substring(5,6)=='0'||carnn.substring(5,6)=='1'||carnn.substring(5,6)=='2'||carnn.substring(5,6)=='3'||carnn.substring(5,6)=='4'||carnn.substring(5,6)=='5'||carnn.substring(5,6)=='6'||carnn.substring(5,6)=='7'||carnn.substring(5,6)=='8'||carnn.substring(5,6)=='9'){
if(carnn.substring(6,7)=='0'||carnn.substring(6,7)=='1'||carnn.substring(6,7)=='2'||carnn.substring(6,7)=='3'||carnn.substring(6,7)=='4'||carnn.substring(6,7)=='5'||carnn.substring(6,7)=='6'||carnn.substring(6,7)=='7'||carnn.substring(6,7)=='8'||carnn.substring(6,7)=='9'){
if(carnn.substring(7,8)=='D'||carnn.substring(7,8)=='F'||carnn.substring(7,8)=='0'||carnn.substring(7,8)=='1'||carnn.substring(7,8)=='2'||carnn.substring(7,8)=='3'||carnn.substring(7,8)=='4'||carnn.substring(7,8)=='5'||carnn.substring(7,8)=='6'||carnn.substring(7,8)=='7'||carnn.substring(7,8)=='8'||carnn.substring(7,8)=='9'){
sfsxny = true;
}
}
}
}
}
}
}
//layer.closeAll();
var checkResult = jsajax.isVehicleNumber(carnn);
if (!checkResult&&!sfsxny) {
/*setTimeout(function(){
layer.msg('车牌号有误', {
time: 1500 //2秒关闭(如果不配置,默认是3秒)
}, function(){});
},200);*/
//$.alert("车牌号有误<br/> 正确格式如:普通车牌:陕K88888,新能源车牌:陕KD8888D");
return false;
}
var data = [{carNumber:carnn}];
editc(JSON.stringify(data),'00');
})
});
function editc(carNumbers,optType){
layui.use(['layer'], function(){});
//mUrl.Caredit
var salt = jsajax.salt(32);
var token = mUrl.GetToken();
var device = mUrl.getDevice();
var sortd = [
{keyname:'app_id',value:'0eca8f5373ca4866aec2f8e9d9367104'},
{keyname:'deviceInfo',value:device},
{keyname:'salt',value:salt},
{keyname:'sign_type',value:'md5'},
{keyname:'carNumbers',value:carNumbers},
{keyname:'token',value:token},
{keyname:'optType',value:optType},
];
console.log(JSON.stringify(sortd));
var md5sign = jsajax.getsign(sortd);
var jsondata = {
app_id : "0eca8f5373ca4866aec2f8e9d9367104",
carNumbers : carNumbers,
deviceInfo : device,
optType : optType,
salt : salt,
sign : md5sign,
sign_type : "md5",
token : token
};
console.log(JSON.stringify(jsondata));
jsajax.defaultReq(
mUrl.Caredit,
JSON.stringify(jsondata),
function(data){
console.log(JSON.stringify(data));
if(data.code==0){
window.location.href = document.referrer;
}else if(data.code==-10005){
layer.msg('最多绑定三辆车', {
time: 1500 //2秒关闭(如果不配置,默认是3秒)
}, function(){});/**/
}else{
layer.msg(data.message, {
time: 1500 //2秒关闭(如果不配置,默认是3秒)
}, function(){});/**/
}
}
);
}
</script>
</body>
</html>