Blame view

out.html 10.4 KB
0a2d5088   liuqimichale   不是我的车牌跳转
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  <!doctype html>
  <html lang="en">
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
      <meta name="theme-color" content="#000000">
      <meta name="google" value="notranslate">
      <meta name="format-detection" content="telephone=no">
      <meta name="format-detection" content="email=no">
      <meta name="apple-mobile-web-app-capable" content="yes">
      <meta name="apple-mobile-web-app-status-bar-style" content="black">
      <meta http-equiv="Pragma" content="no-cache">
      <meta http-equiv="Cache-control" content="no-cache">
      <meta http-equiv="Cache" content="no-cache">
      <meta http-equiv="Expires" content="0">
      <link rel="stylesheet" href="css/reset.css?v=0.1">
      <link rel="stylesheet" href="css/provinceKey.css?v=0.1">
4c2e8331   liuqimichale   黄石扫码支付
18
19
      <script src="js/config.js?a=111"></script>
      <script src="js/common.js?j=0.01"></script>
0a2d5088   liuqimichale   不是我的车牌跳转
20
21
22
23
24
25
26
27
28
      <!--
        Notice the use of %PUBLIC_URL% in the tags above.
        It will be replaced with the URL of the `public` folder during the build.
        Only files inside the `public` folder can be referenced from the HTML.
  
        Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
        work correctly both with client-side routing and a non-root public URL.
        Learn how to configure a non-root public URL by running `npm run build`.
      -->
ea5fab32   liuqimichale   huangshi init
29
  
0a2d5088   liuqimichale   不是我的车牌跳转
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
      <title>扫码查询出场</title>
      <style>
          body {
              background: #f0f4f5;
              margin: 0;
              padding: 0;
              font-family: 'Microsoft YaHei';
              font-size:62.5%; /*1rem=10px*/
          }
          #header {
              margin-top: 25%;
              display: flex;
              justify-content: center;
              align-items: center;
              flex-direction: column;
          }
  
          .phoneText {
              font-size: 18px;
          }
          .inputBox {
              position: relative;
              font-size: 16px;
              margin-top: 20px;
          }
          .subLabel {
              position: absolute;
              left: 0px;
              top: 5px;
              padding:5px;
          }
          .subLabel > span {
              color: #5eb2c0;
          }
          #inputPhoneNum ,#inputCarNum{
              transition: all 0.30s ease-in-out; <!-- -->
              -webkit-transition: all 0.30s ease-in-out;
              -moz-transition: all 0.30s ease-in-out;
              border: #c1bfc5 1px solid;
              border-radius: 3px;
              outline: none;
              height: 30px;
              width: 160px;
              line-height: 30px;
              padding: 5px;
              padding-left: 60px;
              font-size: 18px;
              color:#ff6f16;
          }
  
          #inputPhoneNum:focus {
              box-shadow: 0 0 5px rgba(81, 203, 238, 1);
              -webkit-box-shadow: 0 0 5px rgba(81, 203, 238, 1);
              -moz-box-shadow: 0 0 5px rgba(81, 203, 238, 1);
          }
          .btnOK {
              background:#75cbbe;
              width: 230px;
              height: 3rem;
              line-height: 3rem;
              text-align: center;
              border-radius: 5px;
              color: #ffffff;
              font-size: 1.2rem;
              cursor: pointer;
          }
          .flexBoxRow {
              display: flex;
              justify-content: left;
              flex-direction:row;
              align-items:center;
              width:100%;
          }
          #footer {
              justify-content:center !important;
              padding-top:2rem;
          }
  
  
  
          #tipResult {
              display: none;
              font-size: 2rem;
              font-size: 20px;
              color: #ff6f16;
              margin-top: 25%;
              text-align: center;
              padding: 10px;
          }
          .input_province {
              font-size:1.4rem;
          }
          .input_province:after {
              content: " ";
              position: absolute;
              right: 0px;
              top: 5px;
              width: 1px;
              height: 90%;
              background: #5eb2c0;
          }
          #carNumBox {
              position: relative;
          }
          .splitLine2 {
              color: #5eb2c0;
              position: absolute;
              left: 40px;
              bottom: 11px;
          }
          #exChangeNum {
              margin-top: 1rem;cursor: pointer;
          }
      </style>
  </head>
  <body style="background-color: #f0f4f5;">
  <!--<noscript>-->
  <!--You need to enable JavaScript to run this app.-->
  <!--</noscript>-->
  <header id="header" style="margin-top:20%; display: flex; justify-content: center; align-items: center; flex-direction: column; ">
      <span class="phoneText" id="phoneText">请输入车牌号</span>
      <div class="inputBox">
          <div id="phoneNumBox" style="display:none;">
              <div class="subLabel">+86 <span> |</span></div>
              <input type="tel" id="inputPhoneNum" value="" onkeydown="inputDown();" placeholder="请输入手机号码" maxlength="14" onpaste="return false" style="display:block;" />
          </div>
          <div id="carNumBox" style="display:block;" class="flexBoxRow">
5101e102   liuqimichale   黄石扫码支付
157
              <input class="input_province" type="text" readonly="readonly" maxlength="1" id="selProvince" onclick="provinceSelect();" value="鄂">
0a2d5088   liuqimichale   不是我的车牌跳转
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
              <span class="splitLine2"> |</span>
              <input type="text" maxlength="10" name="inputCarNum" id="inputCarNum" />
          </div>
      </div>
  
  </header>
  <footer id="footer" class="flexBoxRow">
      <div class="btnOK" id="btnPayOK" disabled="disabled">获取订单</div>
      <img src="img/loading.gif" id="loading" style="display: none;" />
  </footer>
  <section id="tipResult" style="display:none;">
      <img src="img/by.png" style="width:220px;height:110px;"/>
      <div id="outTipContent"></div>
  </section>
  <div id="id_keyboard_province"> </div>
0a2d5088   liuqimichale   不是我的车牌跳转
173
  
0a2d5088   liuqimichale   不是我的车牌跳转
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
  <script type="text/javascript">
  var queryParams = null;//?参数名称
  var $btnObj = null, $btnLoad = null;
  function inputDown() {
    var numObj = getObjectByID("inputPhoneNum");
    numObj.value = numObj.value.replace(/\D/g, '').replace(/^/, '$& ').replace(/....(?!$)/g, '$& ');
  }
  window.onload = function () {
    $btnObj = getObjectByID("btnPayOK");
    $btnLoad = getObjectByID("loading");
    $exChangeNum = getObjectByID("exChangeNum");
    // $exChangeNum.onclick = exChangeNumClick;
    queryParams = getQueryString(window.location);//获取url参数?sign=4&token=6&codeType=888
    var ok = $btnObj;
    ok.onclick = btnOkClick;
    //初始化请求订单,有跳转选择支付,没有填入手机号
    $inputCarNum = getObjectByID("inputCarNum");
    $inputCarNum.onkeyup = checkCharAndNumber
    //init();//初始化init
  }
  function init() {
    if (queryParams == null) {
      var str = "没有接收到请求参数"; alertMsg(str); console.log(str); return;
    }
    var params = queryParams || {};
    $btnObj.style.display = "none";
    $btnLoad.style.display = "block";
    params.payType = IsWeixinOrAlipay()//4:微信     1:支付宝
    params.terminalSource = "7";//1:任你听 3:微信公共号 4:云平台 7:H5
    //var tmpParams = Object.assign(params, window.webAppH5.comParams, window.webAppH5.appOut);
    var tmpParams = Object.assign(params, window.webAppH5.comParams);
    getRequest(webAppRoot + window.webAppH5.comServer, tmpParams, "init");
  }
  //点击查询订单
  function btnOkClick() {
    window.location.href = "listnew.html?carNumber=" + getCarNumber();
  
328149f7   liuqimichale   不是我的车牌跳转
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
  //   //var phoneNum = document.getElementById("inputPhoneNum").value.replace(/\s*/g, "");//去除空格
  //   if (queryParams == null) {
  //     var str = "没有接收到请求参数"; alertMsg(str); console.log(str); return;
  //   }
  //   $btnObj.style.display = "none";
  //   $btnLoad.style.display = "block";
  //   var params = queryParams || {};
  //   //获取当前选中手机号或车牌号
  //   params.carNumber = getCarNumber();//手机号
  //   if (params.carNumber == "") {
  //     $btnObj.style.display = "block"; $btnLoad.style.display = "none";
  //     return;
  //   }
  //   params.terminalSource = "7";//1:任你听 3:微信公共号 4:云平台 7:H5
  //   params.payType = IsWeixinOrAlipay()//4:微信     1:支付宝
  //   //var tmpParams = Object.assign(params, window.webAppH5.comParams, window.webAppH5.appOut);
  //   var tmpParams = Object.assign(params, window.webAppH5.comParams);
  //   getRequest(webAppRoot + window.webAppH5.comServer, tmpParams, "okClick");
0a2d5088   liuqimichale   不是我的车牌跳转
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
  }
  
  //读取订单数据
  function getRequest(url, params, init) {
    var btnObj = $btnObj;
    postRequest(url, params, function (res) {
      btnObj.style.display = "block";
      $btnLoad.style.display = "none";
      if (res.code == 0) {//进场
        //alertMsg("出场成功");
        if (res.data) {
          var tmpObj = res.data;
          //判断是否需要支付
          if (tmpObj.needPay) {
            var queryParams = parseParams(tmpObj);
            console.log(tmpObj)
            window.location.href = "../listnew.html?carNumber" + queryParams;
          } else {
            var tipStr = "无需缴费,欢迎下次光临";
            sucessTip(tipStr); alertMsg(tipStr);
          }
56ef5f90   liuqimichale   黄石 30分钟内不需要缴费
250
  
0a2d5088   liuqimichale   不是我的车牌跳转
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
  
        } else {
          alertMsg("没有找到订单");
        }
      } else {//其他情况如【该卡号场内已存在】
        console.log(res.message); alertMsg(res.message);
        if ((init) != "init") {
          alertMsg(res.message);
        }
        document.getElementById("inputPhoneNum").focus();
      }
    }, function (err) {
      console.log("网络服务超时..." + url);
      alertMsg("网络服务超时");
      btnObj.style.display = "block";
      $btnLoad.style.display = "none";
    });
  }
  //直接无需缴费出场
  function sucessTip(content) {
    var obj = ["header", "footer"];
    for (var i = 0; i < obj.length; i++) {
      var tmpObj = document.getElementById("" + obj[i] + "");
      tmpObj.style.display = "none";
    }
    document.getElementById("tipResult").style.display = "block";
    document.getElementById("outTipContent").innerHTML = content;
  }
  
  
  //获取查询条件值
  function getCarNumber() {
0a2d5088   liuqimichale   不是我的车牌跳转
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
  
  
  
    var tmpValue = "";
    var tmpPhone = getObjectByID("inputPhoneNum");
    var phoneNumBox = getObjectByID("phoneNumBox");//手机号
    if(phoneNumBox.style.display === "block"){
      tmpValue = tmpPhone.value.replace(/\s*/g, "")+'111';//去除空格
      if (tmpValue == "" || tmpValue.length < 11) {
        alertMsg("请输入正确的手机号码!");
        tmpValue = "";
      }
    }else{
      var tmpNum = getObjectByID("inputCarNum").value;
      tmpValue = getObjectByID("selProvince").value + tmpNum;
      if (tmpNum == "" || tmpNum == " ") {
        alertMsg("车牌号不能为空!");
        tmpValue = "";
      }
    }
    console.log("查询值:" + tmpValue);
    return tmpValue;
  
  }
  </script>
  
  <script src="js/jquery-3.2.1.min.js"></script>
  <script src="js/provinceKey.js?v=0.1"></script>
  </body>
  
  
  </html>