Commit a0c3e5ba00c597a89ba620c61626d2970fd3084a

Authored by liuqimichale
1 parent e4af9104

赤峰 扫码支付 签名

js/ajax.js
1 -var jsajax = jsajax || {};  
2 -//任你停赤峰  
3 -jsajax.appID = 'wx2af2bab90d433c86';  
4 -//获取openid  
5 -jsajax.getopenid = function (code,fn) {  
6 - var openid = '';  
7 - var jsondata = {  
8 - appId:jsajax.appID,  
9 - code:code  
10 - };  
11 - jsajax.defaultReq(  
12 - mUrl.tcgetopenid,  
13 - JSON.stringify(jsondata),  
14 - function(data){  
15 - console.log("根据code获取openid"+JSON.stringify(data));  
16 - if(data.code=='0'){  
17 - openid = data.data;  
18 - mUrl.SetOpenid(openid);  
19 - mUrl.setApporWX('wx');  
20 - console.log("用户 openid "+openid);  
21 - fn(openid);  
22 - }  
23 - }  
24 - );  
25 -}  
26 -//获取token  
27 -jsajax.gett = function (openid,fn) {  
28 - var jsondata = {  
29 - openid:openid,  
30 - deviceInfo:"BC0703A4-AFB0-4B51-9089-9B7487C0CC6E"  
31 - }  
32 - jsajax.defaultReq(  
33 - mUrl.tcgettoken,  
34 - JSON.stringify(jsondata),  
35 - function (data) {  
36 - console.log('执行获取token的接口 '+JSON.stringify(data));  
37 - if(data.code==0){  
38 - console.log("用户 token "+data.data.token);  
39 - mUrl.SetToken(data.data.token);  
40 - mUrl.SetPhone(data.data.phoneNum);  
41 - fn(1);  
42 - }else{  
43 - fn(0);  
44 - //location.href = mUrl.Uri+'/WEB-INF/pages/elsepages/common_pages/paybind.html;  
45 - }  
46 - }  
47 - );  
48 -}  
49 -/*获取设备 start*/  
50 -  
51 -jsajax.setstyle = function(){  
52 -  
53 - var pt = '';  
54 - if(mUrl.getApporWX()&&mUrl.getApporWX()!=''){  
55 - pt = mUrl.getApporWX();  
56 - }  
57 -// alert('clapntemp_获取到用户openid'+mUrl.getApporWX());  
58 -  
59 - if(pt!=''){  
60 - if(pt=='iosapp'||pt=='andriodapp'){  
61 - if($('.qihuan')){  
62 - $('.qihuan').addClass('iosapp');  
63 - }  
64 -  
65 - }  
66 - }  
67 - console.log('执行米 '+pt);  
68 -}  
69 -jsajax.setstyle();  
70 -  
71 -  
72 -  
73 -/*根据不同的类型加载不同的文件 start*/  
74 -jsajax.dynamicLoading = {  
75 - css: function(path){  
76 - if(!path || path.length === 0){  
77 - throw new Error('argument "path" is required !');  
78 - }  
79 - var head = document.getElementsByTagName('head')[0];  
80 - var link = document.createElement('link');  
81 - link.href = path;  
82 - link.rel = 'stylesheet';  
83 - link.type = 'text/css';  
84 - head.appendChild(link);  
85 - },  
86 - js: function(path){  
87 - if(!path || path.length === 0){  
88 - throw new Error('argument "path" is required !');  
89 - }  
90 - var head = document.getElementsByTagName('head')[0];  
91 - var script = document.createElement('script');  
92 - script.src = path;  
93 - script.type = 'text/javascript';  
94 - head.appendChild(script);  
95 - }  
96 -}  
97 -  
98 -jsajax.setcss = function(strpath){  
99 - var wxorapp = mUrl.getApporWX();  
100 - console.log('这里先获取 '+wxorapp);  
101 - if(wxorapp){  
102 - if(wxorapp!='wx'){  
103 - console.log('不是微信微信');  
104 - if(strpath){  
105 - jsajax.dynamicLoading.css(strpath);  
106 - }  
107 -  
108 - }else{  
109 - //jsajax.dynamicLoading.css("n1.css");  
110 - //console.log('dengyu微信');  
111 - }  
112 - }else{  
113 - jsajax.dynamicLoading.css(strpath);  
114 - }  
115 -};  
116 -  
117 -/* 默认请求*/  
118 -jsajax.defaultReq=function(url, data, successfn,errorfn) {  
119 - data = (data==null || data=="" || typeof(data)=="undefined")? {"date": new Date().getTime()} : data;  
120 - $.ajax({  
121 - type: "post",  
122 - data: data,  
123 - url: url,  
124 - dataType: "json",  
125 - contentType:'application/json;charset=utf-8',  
126 - beforeSend:function(xhr){},  
127 - success: function(d){  
128 - successfn(d);  
129 - },  
130 - error: function(e){  
131 - //alert(JSON.stringify(e));  
132 - console.log(JSON.stringify(e));  
133 - if (typeof (errorfn) != "undefined") {  
134 - errorfn(JSON.stringify(e));  
135 - }  
136 - },  
137 - complete:function (e) {}  
138 - });  
139 -}  
140 -/* 车牌号校验.<br/>*/  
141 -jsajax.isVehicleNumber=function(vehicleNumber){  
142 - var result = false;  
143 - if (vehicleNumber.length == 7){  
144 - var express = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;  
145 - result = express.test(vehicleNumber);  
146 - }  
147 - return result;  
148 -}  
149 -  
150 -//获取签名  
151 -jsajax.getsign = function(objb){  
152 - var compare = function (obj1, obj2) {  
153 - var val1 = obj1.keyname;  
154 - var val2 = obj2.keyname;  
155 - if (val1 < val2) {  
156 - return -1;  
157 - } else if (val1 > val2) {  
158 - return 1;  
159 - } else {  
160 - return 0;  
161 - }  
162 - }  
163 - objb.sort(compare);  
164 - var strmd5 = '14318527b13840c2a4af63fef52c2d6e';  
165 - for(var i=0;i<objb.length;i++){  
166 - if(objb[i].value != null&&objb[i].value != ''){  
167 - strmd5 += objb[i].keyname+objb[i].value;  
168 - }  
169 - }  
170 - strmd5 += '14318527b13840c2a4af63fef52c2d6e';  
171 - console.log('strmd5-------->'+strmd5);  
172 - strmd5 = md5(strmd5);  
173 - strmd5=strmd5.toUpperCase();  
174 - return strmd5;  
175 -}  
176 -//获取盐值  
177 -jsajax.salt=function(a){  
178 - var len = parseInt(a);  
179 - var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';  
180 - var maxPos = $chars.length;  
181 - var pwd = '';  
182 -   for (var i = 0; i < len; i++) {  
183 -       pwd += $chars.charAt(Math.floor(Math.random() * maxPos));  
184 -   }  
185 - console.log(pwd);  
186 -   return pwd;  
187 -}  
188 -  
189 -//金额转换(分转化成元)  
190 -jsajax.fenToYuan=function(fen){  
191 - if( fen == null || fen.length<=0 || isNaN(fen) == true){  
192 - return "";  
193 - }  
194 - var yuan = Math.round(fen);  
195 - yuan = yuan.toString();  
196 - var before = yuan.substr(0, yuan.length - 2);  
197 -  
198 - var end = yuan.substr(yuan.length - 2, 2);  
199 - before = before.toString();  
200 - end = end.toString();  
201 - if(before==''){  
202 - before = '0';  
203 - }  
204 - if(fen<10){  
205 - end = '0'+end;  
206 - }  
207 - yuan = before + "." + end;  
208 - var re = /(-?\d+)(\d{3})/;  
209 - while (re.test(yuan)) {  
210 - yuan = yuan.replace(re, "$1,$2")  
211 - }  
212 - return yuan;  
213 -}  
214 -function isAndroidorios(fn){  
215 - var u = navigator.userAgent, app = navigator.appVersion;  
216 - var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器  
217 - var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端  
218 - isAndroid==true?true:false;  
219 - var jixing = '';  
220 - if(isAndroid){jixing = 'android';}else if(isiOS){  
221 - jixing = 'ios';  
222 - }  
223 - fn(jixing);  
224 -}  
225 -//时间转化 秒转分  
226 -jsajax.formatSeconds = function (value) {  
227 - var theTime = parseInt(value);// 秒  
228 - var theTime1 = 0;// 分  
229 - var theTime2 = 0;// 小时  
230 - var result = '';  
231 - var day = parseInt(theTime/(60*60*24));  
232 - var hours = parseInt(theTime/(60*60) - day*24);  
233 - var fen = parseInt(theTime/60 -hours*60 - day*24*60);  
234 - var senc = parseInt(theTime -fen*60 -hours*60*60 - day*24*60*60);  
235 - if(day>0){result +=day+'天';}  
236 - if(hours>0){result +=hours+'小时';}  
237 - if(fen>0){result +=fen+'分';}  
238 - if(senc>0){result +=senc+'秒';}  
239 - return result;  
240 -}  
241 -  
242 -jsajax.fStohours = function (value) {  
243 - var theTime = parseInt(value);// 秒  
244 - var theTime1 = 0;// 分  
245 - var theTime2 = 0;// 小时  
246 - if(theTime > 60) {  
247 - theTime1 = parseInt(theTime/60);  
248 - theTime = parseInt(theTime%60);  
249 - if(theTime1 > 60) {  
250 - theTime2 = parseInt(theTime1/60);  
251 - theTime1 = parseInt(theTime1%60);  
252 - }  
253 - }  
254 - var result = "";//+parseInt(theTime)+"秒";  
255 - if(theTime1 > 0) {  
256 - result = ""+parseInt(theTime1)+"分"+result;  
257 - }  
258 - if(theTime2 > 0) {  
259 - result = ""+parseInt(theTime2)+"小时"+result;  
260 - }  
261 - return result;  
262 -}  
263 -//为Date类型拓展一个format方法,用于格式化日期  
264 -Date.prototype.format = function (format) //author: meizz  
265 -{  
266 - var o = {  
267 - "M+": this.getMonth() + 1, //month  
268 - "d+": this.getDate(), //day  
269 - "h+": this.getHours(), //hour  
270 - "m+": this.getMinutes(), //minute  
271 - "s+": this.getSeconds(), //second  
272 - "q+": Math.floor((this.getMonth() + 3) / 3), //quarter  
273 - "S": this.getMilliseconds() //millisecond  
274 - };  
275 - if (/(y+)/.test(format))  
276 - format = format.replace(RegExp.$1,  
277 - (this.getFullYear() + "").substr(4 - RegExp.$1.length));  
278 - for (var k in o)  
279 - if (new RegExp("(" + k + ")").test(format))  
280 - format = format.replace(RegExp.$1,  
281 - RegExp.$1.length == 1 ? o[k] :  
282 - ("00" + o[k]).substr(("" + o[k]).length));  
283 - return format;  
284 -};  
285 -  
286 -//时间格式的返回  
287 -Date.prototype.toLocaleString = function() {  
288 - var se = this.getSeconds();  
289 - var fz = this.getMinutes();  
290 - if(se>=0&&se<=9){  
291 - se = '0'+se;  
292 - }  
293 - if(fz>=0&&fz<=9){  
294 - fz = '0'+fz;  
295 - }  
296 - return this.getFullYear() + "/" + (this.getMonth() + 1) + "/" + this.getDate() + " " + this.getHours() + ":" + fz + ":" + se;  
297 -}; 1 +eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('1i.26=j(){z.27=j(){5 a=1i.28||29[0];6(a.P==25){n C}w{6((a.23)&&(a.1j)&&(a.P==1Z)){n C}w{6((a.1j)&&(a.P==1Y)){n C}}}};z.20=j(){n C}};5 21="22";5 k=k||{};k.1k="2a";k.2b=j(c,a){5 b="";5 d={2i:k.1k,J:c};k.Q(t.2j,x.B(d),j(e){u.v("根据J获取W"+x.B(e));6(e.J=="0"){b=e.E;t.2k(b);t.2l("1u");u.v("用户 W "+b);a(b)}})};k.2h=j(b,a){5 c={W:b,2g:"2c-2d-1X-2f-2m"};k.Q(t.1T,x.B(c),j(d){u.v("执行获取F的接口 "+x.B(d));6(d.J==0){u.v("用户 F "+d.E.F);t.1D(d.E.F);t.1G(d.E.1K);a(1)}w{a(0)}})};k.1d=j(){5 a="";6(t.I()&&t.I()!=""){a=t.I()}6(a!=""){6(a=="1g"||a=="1J"){6($(".1h")){$(".1h").1H("1g")}}}u.v("执行米 "+a)};k.1d();k.T={L:j(c){6(!c||c.r===0){1e H 1f(\'1l "1m" 1s 1t !\')}5 a=z.1r("1c")[0];5 b=z.1n("1F");b.1I=c;b.1W="1S";b.Y="1o/L";a.1p(b)},1L:j(c){6(!c||c.r===0){1e H 1f(\'1l "1m" 1s 1t !\')}5 b=z.1r("1c")[0];5 a=z.1n("1Q");a.1M=c;a.Y="1o/1N";b.1p(a)}};k.2n=j(b){5 a=t.I();u.v("这里先获取 "+a);6(a){6(a!="1u"){u.v("不是微信微信");6(b){k.T.L(b)}}w{}}w{k.T.L(b)}};k.Q=j(a,b,d,c){b=(b==O||b==""||1a(b)=="17")?{2e:H 12().2y()}:b;$.2U({Y:"2T",E:b,2S:a,2Q:"19",2X:"2R/19;2W=30-8",2Z:j(e){},2Y:j(e){d(e)},2O:j(f){u.v(x.B(f));6(1a(c)!="17"){c(x.B(f))}},2x:j(f){}})};k.2P=j(b){5 a=C;6(b.r==7){5 c=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-1v-9]{4}[A-1v-9挂学警港澳]{1}$/;a=c.G(b)}n a};k.2z=j(b){5 d=j(h,g){5 f=h.14;5 e=g.14;6(f<e){n-1}w{6(f>e){n 1}w{n 0}}};b.2u(d);5 c="1b";16(5 a=0;a<b.r;a++){6(b[a].15!=O&&b[a].15!=""){c+=b[a].14+b[a].15}}c+="1b";u.v("2o-------->"+c);c=2q(c);c=c.2r();n c};k.2s=j(d){5 c=p(d);5 e="2A";5 b=e.r;5 g="";16(5 f=0;f<c;f++){g+=e.2B(K.1A(K.2K()*b))}u.v(g);n g};k.2M=j(c){6(c==O||c.r<=0||2N(c)==11){n""}5 a=K.2I(c);a=a.R();5 e=a.N(0,a.r-2);5 b=a.N(a.r-2,2);e=e.R();b=b.R();6(e==""){e="0"}6(c<10){b="0"+b}a=e+"."+b;5 d=/(-?\\d+)(\\d{3})/;2D(d.G(a)){a=a.13(d,"$1,$2")}n a};j 2C(e){5 a=18.2E,f=18.2G;5 d=a.1q("1O")>-1||a.1q("2F")>-1;5 c=!!a.2H(/\\(i[^;]+;( U;)? 2L.+2J 2p X/);d==11?11:C;5 b="";6(d){b="2t"}w{6(c){b="2v"}}e(b)}k.2w=j(h){5 e=p(h);5 c=0;5 b=0;5 i="";5 f=p(e/(l*l*24));5 g=p(e/(l*l)-f*24);5 a=p(e/l-g*l-f*24*l);5 d=p(e-a*l-g*l*l-f*24*l*l);6(f>0){i+=f+"天"}6(g>0){i+=g+"小时"}6(a>0){i+=a+"分"}6(d>0){i+=d+"秒"}n i};k.2V=j(e){5 d=p(e);5 c=0;5 b=0;6(d>l){c=p(d/l);d=p(d%l);6(c>l){b=p(c/l);c=p(c%l)}}5 a="";6(c>0){a=""+p(c)+"分"+a}6(b>0){a=""+p(b)+"小时"+a}n a};12.1z.1P=j(b){5 c={"M+":o.V()+1,"d+":o.1x(),"h+":o.1w(),"m+":o.1C(),"s+":o.1y(),"q+":K.1A((o.V()+3)/3),S:o.1R()};6(/(y+)/.G(b)){b=b.13(D.$1,(o.1B()+"").N(4-D.$1.r))}16(5 a 1V c){6(H D("("+a+")").G(b)){b=b.13(D.$1,D.$1.r==1?c[a]:("1U"+c[a]).N((""+c[a]).r))}}n b};12.1z.1E=j(){5 b=o.1y();5 a=o.1C();6(b>=0&&b<=9){b="0"+b}6(a>=0&&a<=9){a="0"+a}n o.1B()+"/"+(o.V()+1)+"/"+o.1x()+" "+o.1w()+":"+a+":"+b};',62,187,'|||||var|if|||||||||||||function|jsajax|60||return|this|parseInt||length||mUrl|console|log|else|JSON||document||stringify|false|RegExp|data|token|test|new|getApporWX|code|Math|css||substr|null|keyCode|defaultReq|toString||dynamicLoading||getMonth|openid||type|||true|Date|replace|keyname|value|for|undefined|navigator|json|typeof|ny1u72b6k374sg379z0kqjgfxe2ycnpw|head|setstyle|throw|Error|iosapp|qihuan|window|shiftKey|appID|argument|path|createElement|text|appendChild|indexOf|getElementsByTagName|is|required|wx|Z0|getHours|getDate|getSeconds|prototype|floor|getFullYear|getMinutes|SetToken|toLocaleString|link|SetPhone|addClass|href|andriodapp|phoneNum|js|src|javascript|Android|format|script|getMilliseconds|stylesheet|tcgettoken|00|in|rel|4B51|121|73|oncontextmenu|_app_id|ud8yq5tv0inxupc05xfeau39jywlqoj2|ctrlKey||123|onload|onkeydown|event|arguments|wx2af2bab90d433c86|getopenid|BC0703A4|AFB0|date|9089|deviceInfo|gett|appId|tcgetopenid|SetOpenid|setApporWX|9B7487C0CC6E|setcss|strmd5|OS|md5|toUpperCase|salt|android|sort|ios|formatSeconds|complete|getTime|getsign|ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678|charAt|isAndroidorios|while|userAgent|Linux|appVersion|match|round|Mac|random|CPU|fenToYuan|isNaN|error|isVehicleNumber|dataType|application|url|post|ajax|fStohours|charset|contentType|success|beforeSend|utf'.split('|'),0,{}))
js/ajax_min.js 0 → 100644
  1 +window.onload = function () {
  2 + document.onkeydown = function () {
  3 + var e = window.event || arguments[0];
  4 + //屏蔽F12
  5 + if (e.keyCode == 123) {
  6 +
  7 + return false;
  8 + //屏蔽Ctrl+Shift+I
  9 + } else if ((e.ctrlKey) && (e.shiftKey) && (e.keyCode == 73)) {
  10 +
  11 + return false;
  12 + //屏蔽Shift+F10
  13 + } else if ((e.shiftKey) && (e.keyCode == 121)) {
  14 + return false;
  15 + }
  16 + };
  17 + //屏蔽右键单击
  18 + document.oncontextmenu = function () {
  19 + return false;
  20 + }
  21 +}
  22 +
  23 +var _app_id = 'ud8yq5tv0inxupc05xfeau39jywlqoj2'
  24 +
  25 +var jsajax = jsajax || {};
  26 +//任你停赤峰
  27 +
  28 +
  29 +jsajax.appID = 'wx2af2bab90d433c86';
  30 +//获取openid
  31 +jsajax.getopenid = function (code,fn) {
  32 + var openid = '';
  33 + var jsondata = {
  34 + appId:jsajax.appID,
  35 + code:code
  36 + };
  37 + jsajax.defaultReq(
  38 + mUrl.tcgetopenid,
  39 + JSON.stringify(jsondata),
  40 + function(data){
  41 + console.log("根据code获取openid"+JSON.stringify(data));
  42 + if(data.code=='0'){
  43 + openid = data.data;
  44 + mUrl.SetOpenid(openid);
  45 + mUrl.setApporWX('wx');
  46 + console.log("用户 openid "+openid);
  47 + fn(openid);
  48 + }
  49 + }
  50 + );
  51 +}
  52 +//获取token
  53 +jsajax.gett = function (openid,fn) {
  54 + var jsondata = {
  55 + openid:openid,
  56 + deviceInfo:"BC0703A4-AFB0-4B51-9089-9B7487C0CC6E"
  57 + }
  58 + jsajax.defaultReq(
  59 + mUrl.tcgettoken,
  60 + JSON.stringify(jsondata),
  61 + function (data) {
  62 + console.log('执行获取token的接口 '+JSON.stringify(data));
  63 + if(data.code==0){
  64 + console.log("用户 token "+data.data.token);
  65 + mUrl.SetToken(data.data.token);
  66 + mUrl.SetPhone(data.data.phoneNum);
  67 + fn(1);
  68 + }else{
  69 + fn(0);
  70 + //location.href = mUrl.Uri+'/WEB-INF/pages/elsepages/common_pages/paybind.html;
  71 + }
  72 + }
  73 + );
  74 +}
  75 +/*获取设备 start*/
  76 +
  77 +jsajax.setstyle = function(){
  78 +
  79 + var pt = '';
  80 + if(mUrl.getApporWX()&&mUrl.getApporWX()!=''){
  81 + pt = mUrl.getApporWX();
  82 + }
  83 + // alert('clapntemp_获取到用户openid'+mUrl.getApporWX());
  84 +
  85 + if(pt!=''){
  86 + if(pt=='iosapp'||pt=='andriodapp'){
  87 + if($('.qihuan')){
  88 + $('.qihuan').addClass('iosapp');
  89 + }
  90 +
  91 + }
  92 + }
  93 + console.log('执行米 '+pt);
  94 +}
  95 +jsajax.setstyle();
  96 +
  97 +
  98 +
  99 +/*根据不同的类型加载不同的文件 start*/
  100 +jsajax.dynamicLoading = {
  101 + css: function(path){
  102 + if(!path || path.length === 0){
  103 + throw new Error('argument "path" is required !');
  104 + }
  105 + var head = document.getElementsByTagName('head')[0];
  106 + var link = document.createElement('link');
  107 + link.href = path;
  108 + link.rel = 'stylesheet';
  109 + link.type = 'text/css';
  110 + head.appendChild(link);
  111 + },
  112 + js: function(path){
  113 + if(!path || path.length === 0){
  114 + throw new Error('argument "path" is required !');
  115 + }
  116 + var head = document.getElementsByTagName('head')[0];
  117 + var script = document.createElement('script');
  118 + script.src = path;
  119 + script.type = 'text/javascript';
  120 + head.appendChild(script);
  121 + }
  122 +}
  123 +
  124 +jsajax.setcss = function(strpath){
  125 + var wxorapp = mUrl.getApporWX();
  126 + console.log('这里先获取 '+wxorapp);
  127 + if(wxorapp){
  128 + if(wxorapp!='wx'){
  129 + console.log('不是微信微信');
  130 + if(strpath){
  131 + jsajax.dynamicLoading.css(strpath);
  132 + }
  133 +
  134 + }else{
  135 + //jsajax.dynamicLoading.css("n1.css");
  136 + //console.log('dengyu微信');
  137 + }
  138 + }else{
  139 + jsajax.dynamicLoading.css(strpath);
  140 + }
  141 +};
  142 +
  143 +/* 默认请求*/
  144 +jsajax.defaultReq=function(url, data, successfn,errorfn) {
  145 + data = (data==null || data=="" || typeof(data)=="undefined")? {"date": new Date().getTime()} : data;
  146 + $.ajax({
  147 + type: "post",
  148 + data: data,
  149 + url: url,
  150 + dataType: "json",
  151 + contentType:'application/json;charset=utf-8',
  152 + beforeSend:function(xhr){},
  153 + success: function(d){
  154 + successfn(d);
  155 + },
  156 + error: function(e){
  157 + //alert(JSON.stringify(e));
  158 + console.log(JSON.stringify(e));
  159 + if (typeof (errorfn) != "undefined") {
  160 + errorfn(JSON.stringify(e));
  161 + }
  162 + },
  163 + complete:function (e) {}
  164 + });
  165 +}
  166 +/* 车牌号校验.<br/>*/
  167 +jsajax.isVehicleNumber=function(vehicleNumber){
  168 + var result = false;
  169 + if (vehicleNumber.length == 7){
  170 + var express = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
  171 + result = express.test(vehicleNumber);
  172 + }
  173 + return result;
  174 +}
  175 +
  176 +//获取签名
  177 +jsajax.getsign = function(objb){
  178 + var compare = function (obj1, obj2) {
  179 + var val1 = obj1.keyname;
  180 + var val2 = obj2.keyname;
  181 + if (val1 < val2) {
  182 + return -1;
  183 + } else if (val1 > val2) {
  184 + return 1;
  185 + } else {
  186 + return 0;
  187 + }
  188 + }
  189 + objb.sort(compare);
  190 + var strmd5 = 'ny1u72b6k374sg379z0kqjgfxe2ycnpw';
  191 + for(var i=0;i<objb.length;i++){
  192 + if(objb[i].value != null&&objb[i].value != ''){
  193 + strmd5 += objb[i].keyname+objb[i].value;
  194 + }
  195 + }
  196 + strmd5 += 'ny1u72b6k374sg379z0kqjgfxe2ycnpw';
  197 + console.log('strmd5-------->'+strmd5);
  198 + strmd5 = md5(strmd5);
  199 + strmd5=strmd5.toUpperCase();
  200 + return strmd5;
  201 +}
  202 +//获取盐值
  203 +jsajax.salt=function(a){
  204 + var len = parseInt(a);
  205 + var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
  206 + var maxPos = $chars.length;
  207 + var pwd = '';
  208 + for (var i = 0; i < len; i++) {
  209 + pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
  210 + }
  211 + console.log(pwd);
  212 + return pwd;
  213 +}
  214 +
  215 +//金额转换(分转化成元)
  216 +jsajax.fenToYuan=function(fen){
  217 + if( fen == null || fen.length<=0 || isNaN(fen) == true){
  218 + return "";
  219 + }
  220 + var yuan = Math.round(fen);
  221 + yuan = yuan.toString();
  222 + var before = yuan.substr(0, yuan.length - 2);
  223 +
  224 + var end = yuan.substr(yuan.length - 2, 2);
  225 + before = before.toString();
  226 + end = end.toString();
  227 + if(before==''){
  228 + before = '0';
  229 + }
  230 + if(fen<10){
  231 + end = '0'+end;
  232 + }
  233 + yuan = before + "." + end;
  234 + var re = /(-?\d+)(\d{3})/;
  235 + while (re.test(yuan)) {
  236 + yuan = yuan.replace(re, "$1,$2")
  237 + }
  238 + return yuan;
  239 +}
  240 +function isAndroidorios(fn){
  241 + var u = navigator.userAgent, app = navigator.appVersion;
  242 + var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器
  243 + var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
  244 + isAndroid==true?true:false;
  245 + var jixing = '';
  246 + if(isAndroid){jixing = 'android';}else if(isiOS){
  247 + jixing = 'ios';
  248 + }
  249 + fn(jixing);
  250 +}
  251 +//时间转化 秒转分
  252 +jsajax.formatSeconds = function (value) {
  253 + var theTime = parseInt(value);// 秒
  254 + var theTime1 = 0;// 分
  255 + var theTime2 = 0;// 小时
  256 + var result = '';
  257 + var day = parseInt(theTime/(60*60*24));
  258 + var hours = parseInt(theTime/(60*60) - day*24);
  259 + var fen = parseInt(theTime/60 -hours*60 - day*24*60);
  260 + var senc = parseInt(theTime -fen*60 -hours*60*60 - day*24*60*60);
  261 + if(day>0){result +=day+'天';}
  262 + if(hours>0){result +=hours+'小时';}
  263 + if(fen>0){result +=fen+'分';}
  264 + if(senc>0){result +=senc+'秒';}
  265 + return result;
  266 +}
  267 +
  268 +jsajax.fStohours = function (value) {
  269 + var theTime = parseInt(value);// 秒
  270 + var theTime1 = 0;// 分
  271 + var theTime2 = 0;// 小时
  272 + if(theTime > 60) {
  273 + theTime1 = parseInt(theTime/60);
  274 + theTime = parseInt(theTime%60);
  275 + if(theTime1 > 60) {
  276 + theTime2 = parseInt(theTime1/60);
  277 + theTime1 = parseInt(theTime1%60);
  278 + }
  279 + }
  280 + var result = "";//+parseInt(theTime)+"秒";
  281 + if(theTime1 > 0) {
  282 + result = ""+parseInt(theTime1)+"分"+result;
  283 + }
  284 + if(theTime2 > 0) {
  285 + result = ""+parseInt(theTime2)+"小时"+result;
  286 + }
  287 + return result;
  288 +}
  289 +//为Date类型拓展一个format方法,用于格式化日期
  290 +Date.prototype.format = function (format) //author: meizz
  291 +{
  292 + var o = {
  293 + "M+": this.getMonth() + 1, //month
  294 + "d+": this.getDate(), //day
  295 + "h+": this.getHours(), //hour
  296 + "m+": this.getMinutes(), //minute
  297 + "s+": this.getSeconds(), //second
  298 + "q+": Math.floor((this.getMonth() + 3) / 3), //quarter
  299 + "S": this.getMilliseconds() //millisecond
  300 + };
  301 + if (/(y+)/.test(format))
  302 + format = format.replace(RegExp.$1,
  303 + (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  304 + for (var k in o)
  305 + if (new RegExp("(" + k + ")").test(format))
  306 + format = format.replace(RegExp.$1,
  307 + RegExp.$1.length == 1 ? o[k] :
  308 + ("00" + o[k]).substr(("" + o[k]).length));
  309 + return format;
  310 +};
  311 +
  312 +//时间格式的返回
  313 +Date.prototype.toLocaleString = function() {
  314 + var se = this.getSeconds();
  315 + var fz = this.getMinutes();
  316 + if(se>=0&&se<=9){
  317 + se = '0'+se;
  318 + }
  319 + if(fz>=0&&fz<=9){
  320 + fz = '0'+fz;
  321 + }
  322 + return this.getFullYear() + "/" + (this.getMonth() + 1) + "/" + this.getDate() + " " + this.getHours() + ":" + fz + ":" + se;
  323 +};
js/common.js
1 -/* 1 +window.onload = function () {
  2 + document.onkeydown = function () {
  3 + var e = window.event || arguments[0];
  4 + //屏蔽F12
  5 + if (e.keyCode == 123) {
  6 +
  7 + return false;
  8 + //屏蔽Ctrl+Shift+I
  9 + } else if ((e.ctrlKey) && (e.shiftKey) && (e.keyCode == 73)) {
  10 +
  11 + return false;
  12 + //屏蔽Shift+F10
  13 + } else if ((e.shiftKey) && (e.keyCode == 121)) {
  14 + return false;
  15 + }
  16 + };
  17 + //屏蔽右键单击
  18 + document.oncontextmenu = function () {
  19 + return false;
  20 + }
  21 +}
  22 +
  23 +
  24 +
  25 +
  26 +/*
2 state 27 state
3 */ 28 */
4 var appState = { 29 var appState = {
@@ -73,7 +98,7 @@ function convertData(data) { @@ -73,7 +98,7 @@ function convertData(data) {
73 // "id": "456" 98 // "id": "456"
74 // }, 99 // },
75 // beforeSend: function () { 100 // beforeSend: function () {
76 -// //some js code 101 +// //some js code
77 // }, 102 // },
78 // success: function (msg) { 103 // success: function (msg) {
79 // console.log(msg) 104 // console.log(msg)
@@ -91,7 +116,7 @@ function postRequest(url,params,successCallback, errorCallback) { @@ -91,7 +116,7 @@ function postRequest(url,params,successCallback, errorCallback) {
91 dataType: "json", 116 dataType: "json",
92 data: JSON.stringify(params), 117 data: JSON.stringify(params),
93 beforeSend: function () { 118 beforeSend: function () {
94 - //some js code 119 + //some js code
95 }, 120 },
96 success: function (msg) { 121 success: function (msg) {
97 successCallback(msg); 122 successCallback(msg);
@@ -111,7 +136,7 @@ function postRequest(url,params,successCallback, errorCallback) { @@ -111,7 +136,7 @@ function postRequest(url,params,successCallback, errorCallback) {
111 136
112 /*获取URL?参数*/ 137 /*获取URL?参数*/
113 function getQueryString(location) { 138 function getQueryString(location) {
114 - //var url = location.search; //获取url中"?"符后的字串 139 + //var url = location.search; //获取url中"?"符后的字串
115 var url = location.search; 140 var url = location.search;
116 var theRequest = new Object(); 141 var theRequest = new Object();
117 if (url.indexOf("?") != -1) { 142 if (url.indexOf("?") != -1) {
@@ -163,19 +188,19 @@ function keepTwoDecimalFull(num) { @@ -163,19 +188,19 @@ function keepTwoDecimalFull(num) {
163 return s_x; 188 return s_x;
164 } 189 }
165 190
166 -/**  
167 - * param 将要转为URL参数字符串的对象  
168 - * key URL参数字符串的前缀  
169 - * encode true/false 是否进行URL编码,默认为true  
170 - *  
171 - * return URL参数字符串 191 +/**
  192 + * param 将要转为URL参数字符串的对象
  193 + * key URL参数字符串的前缀
  194 + * encode true/false 是否进行URL编码,默认为true
  195 + *
  196 + * return URL参数字符串
172 */ 197 */
173 var parseParams = function (data) { 198 var parseParams = function (data) {
174 try { 199 try {
175 var tempArr = []; 200 var tempArr = [];
176 for (var i in data) { 201 for (var i in data) {
177 var key = (i); 202 var key = (i);
178 - var value = encodeURIComponent(data[i]);//decodeURIComponent 203 + var value = encodeURIComponent(data[i]);//decodeURIComponent
179 tempArr.push(key + '=' + value); 204 tempArr.push(key + '=' + value);
180 } 205 }
181 var urlParamsStr = tempArr.join('&'); 206 var urlParamsStr = tempArr.join('&');
js/config.js
@@ -9,9 +9,9 @@ window.webAppH5 = {}; @@ -9,9 +9,9 @@ window.webAppH5 = {};
9 /*服务器地址*/ 9 /*服务器地址*/
10 // var webAppRoot = "http://pay.service.huangshiparking.com"; 10 // var webAppRoot = "http://pay.service.huangshiparking.com";
11 11
12 -var webAppRoot = 'http://pay.service.renniting.cn/'; //赤峰 12 +// var webAppRoot = 'http://pay.service.renniting.cn/'; //赤峰
13 //test 测试环境 13 //test 测试环境
14 -// var webAppRoot = "http://39.98.58.92:8090"; 14 +var webAppRoot = "http://39.98.58.92:8090";
15 //微信支付结果回调地址 15 //微信支付结果回调地址
16 var webAppPayResult = "http://wxgzh.renniting.cn/wechatwuxi/DEV/Threewf/codepay/page/wxpayResult.html"; 16 var webAppPayResult = "http://wxgzh.renniting.cn/wechatwuxi/DEV/Threewf/codepay/page/wxpayResult.html";
17 17
@@ -53,70 +53,8 @@ webAppH5.zeroPayServer = &quot;/appAccountPay/zeroPay&quot;; @@ -53,70 +53,8 @@ webAppH5.zeroPayServer = &quot;/appAccountPay/zeroPay&quot;;
53 53
54 54
55 55
56 -  
57 -  
58 -  
59 -  
60 -  
61 -  
62 -  
63 -/*入场参数*/  
64 -//测试地址  
65 -//http://localhost:18879/page/in.html?plNo=P11011700C&parkingId=1&channelId=172198242&direction=0&codeType=0&expireDate=expireDate&extendData=extendData  
66 -//channelId=172198242 [入场设备号]  
67 -//webAppH5.appIn = {  
68 -// /*入场设备号*/  
69 -// channelId: '172198242',  
70 -// /*入:0,1:出*/  
71 -// direction: 0  
72 -//}  
73 -  
74 -/*出场参数*/  
75 -//测试地址  
76 -//http://localhost:18879/page/out.html?plNo=P11011700C&parkingId=1&channelId=172198243&direction=1&codeType=0&expireDate=expireDate&extendData=extendData  
77 -//channelId=172198243 [出场设备号]  
78 -//direction=0 [通行方向 入:0,1:出 必填]  
79 -//webAppH5.appOut = {  
80 -// /*出场设备号*/  
81 -// channelId: '172198243',  
82 -// /*入:0,1:出*/  
83 -// direction:1  
84 -//}  
85 -  
86 -//小票二维码出场  
87 -//http://39.98.54.240/codepay/index.html?appid=0&lotId=1&payConfigId=2&receiptNo=3  
88 -//http://localhost:1260/codepay/index.html?appid=0&lotId=1&payConfigId=2&receiptNo=3  
89 -  
90 -  
91 -//首页  
92 -//进出场标识>>>>>>>>>>direction=0 [通行方向 入:0,1:出 必填]  
93 -//测试服务器进场首页  
94 -//http://39.98.54.240/codepay/index.html?plNo=P11011700C&parkingId=1&channelId=172198242&direction=0&codeType=0&expireDate=expireDate&extendData=extendData  
95 -  
96 -//测试服务器出场首页  
97 -//http://39.98.54.240/codepay/index.html?plNo=P11011700C&parkingId=1&channelId=172198243&direction=1&codeType=0&expireDate=expireDate&extendData=extendData  
98 -  
99 -  
100 -  
101 -//测试支付[任你停测试-首页-停车记录(停车列表车牌号,再找到对应停车场编号)]  
102 -//http://test.renniting.cn/parking/admin/SubMenus/allparkrecords.html  
103 -  
104 -//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  
105 -  
106 -  
107 function IsWeixinOrAlipay(){ 56 function IsWeixinOrAlipay(){
108 - //  
109 - // var ua = window.navigator.userAgent;  
110 - // //判断是不是微信  
111 - // if ( ua.indexOf("MicroMessenger") > 0 ) {  
112 - // return 4;  
113 - // }  
114 - // //判断是不是支付宝  
115 - // if (ua.indexOf("Alipayclient") > 0) {  
116 - // return 1;  
117 - // }  
118 - // //哪个都不  
119 - // return "false"; 57 +
120 var clientType = clientBrowserEx(); 58 var clientType = clientBrowserEx();
121 if(clientType=='wxPay'){ 59 if(clientType=='wxPay'){
122 return 4 60 return 4
js/list.js
@@ -41,7 +41,7 @@ $(&#39;.carNum&#39;).text(_carNumber) @@ -41,7 +41,7 @@ $(&#39;.carNum&#39;).text(_carNumber)
41 */ 41 */
42 var salt = jsajax.salt(32); 42 var salt = jsajax.salt(32);
43 var sortd = [ 43 var sortd = [
44 - { keyname: 'app_id', value: '0eca8f5373ca4866aec2f8e9d9367104' }, 44 + { keyname: 'app_id', value: _app_id },
45 { keyname: 'deviceInfo', value: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E' }, 45 { keyname: 'deviceInfo', value: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E' },
46 { keyname: 'salt', value: salt }, 46 { keyname: 'salt', value: salt },
47 { keyname: 'sign_type', value: 'md5' }, 47 { keyname: 'sign_type', value: 'md5' },
@@ -54,7 +54,7 @@ var sortd = [ @@ -54,7 +54,7 @@ var sortd = [
54 ]; 54 ];
55 var md5sign = jsajax.getsign(sortd); 55 var md5sign = jsajax.getsign(sortd);
56 var jsondata = { 56 var jsondata = {
57 - app_id: "0eca8f5373ca4866aec2f8e9d9367104", 57 + app_id: _app_id,
58 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", 58 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E",
59 salt: salt, 59 salt: salt,
60 sign_type: "md5", 60 sign_type: "md5",
@@ -145,7 +145,7 @@ $(document).on(&#39;click&#39;, &#39;.out-btn&#39;, function () { @@ -145,7 +145,7 @@ $(document).on(&#39;click&#39;, &#39;.out-btn&#39;, function () {
145 token = ''; 145 token = '';
146 } 146 }
147 var jsondata = { 147 var jsondata = {
148 - app_id: "0eca8f5373ca4866aec2f8e9d9367104", 148 + app_id: _app_id,
149 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", 149 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E",
150 salt: salt, 150 salt: salt,
151 sign: getMd5sign(), 151 sign: getMd5sign(),
@@ -202,7 +202,7 @@ function getOneorder(carNumber, parkCode, orderId, _paySrcType) { @@ -202,7 +202,7 @@ function getOneorder(carNumber, parkCode, orderId, _paySrcType) {
202 _payType = 1 202 _payType = 1
203 } 203 }
204 var jsondata = { 204 var jsondata = {
205 - app_id: "0eca8f5373ca4866aec2f8e9d9367104", 205 + app_id: _app_id,
206 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", 206 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E",
207 salt: salt, 207 salt: salt,
208 sign: getMd5sign(), 208 sign: getMd5sign(),
@@ -290,7 +290,7 @@ function getMd5sign() { @@ -290,7 +290,7 @@ function getMd5sign() {
290 token = ''; 290 token = '';
291 } 291 }
292 var sortd = [ 292 var sortd = [
293 - { keyname: 'app_id', value: '0eca8f5373ca4866aec2f8e9d9367104' }, 293 + { keyname: 'app_id', value: _app_id },
294 { keyname: 'deviceInfo', value: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E' }, 294 { keyname: 'deviceInfo', value: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E' },
295 { keyname: 'salt', value: salt }, 295 { keyname: 'salt', value: salt },
296 { keyname: 'sign_type', value: 'md5' }, 296 { keyname: 'sign_type', value: 'md5' },
js/listnew.js
@@ -33,7 +33,7 @@ $(&#39;#payCarNum&#39;).text(_carNumber) @@ -33,7 +33,7 @@ $(&#39;#payCarNum&#39;).text(_carNumber)
33 */ 33 */
34 var salt = jsajax.salt(32); 34 var salt = jsajax.salt(32);
35 var sortd = [ 35 var sortd = [
36 - { keyname: 'app_id', value: '0eca8f5373ca4866aec2f8e9d9367104' }, 36 + { keyname: 'app_id', value: _app_id },
37 { keyname: 'deviceInfo', value: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E' }, 37 { keyname: 'deviceInfo', value: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E' },
38 { keyname: 'salt', value: salt }, 38 { keyname: 'salt', value: salt },
39 { keyname: 'sign_type', value: 'md5' }, 39 { keyname: 'sign_type', value: 'md5' },
@@ -46,7 +46,7 @@ var sortd = [ @@ -46,7 +46,7 @@ var sortd = [
46 ]; 46 ];
47 var md5sign = jsajax.getsign(sortd); 47 var md5sign = jsajax.getsign(sortd);
48 var jsondata = { 48 var jsondata = {
49 - app_id: "0eca8f5373ca4866aec2f8e9d9367104", 49 + app_id: _app_id,
50 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", 50 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E",
51 salt: salt, 51 salt: salt,
52 sign_type: "md5", 52 sign_type: "md5",
@@ -275,7 +275,7 @@ $(document).on(&#39;click&#39;, &#39;.out-btn&#39;, function () { @@ -275,7 +275,7 @@ $(document).on(&#39;click&#39;, &#39;.out-btn&#39;, function () {
275 token = ''; 275 token = '';
276 } 276 }
277 var jsondata = { 277 var jsondata = {
278 - app_id: "0eca8f5373ca4866aec2f8e9d9367104", 278 + app_id: _app_id,
279 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", 279 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E",
280 salt: salt, 280 salt: salt,
281 sign: getMd5sign(), 281 sign: getMd5sign(),
@@ -332,7 +332,7 @@ function getOneorder(carNumber, parkCode, orderId, _paySrcType) { @@ -332,7 +332,7 @@ function getOneorder(carNumber, parkCode, orderId, _paySrcType) {
332 _payType = 1 332 _payType = 1
333 } 333 }
334 var jsondata = { 334 var jsondata = {
335 - app_id: "0eca8f5373ca4866aec2f8e9d9367104", 335 + app_id: _app_id,
336 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", 336 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E",
337 salt: salt, 337 salt: salt,
338 sign: getMd5sign(), 338 sign: getMd5sign(),
@@ -420,7 +420,7 @@ function getMd5sign() { @@ -420,7 +420,7 @@ function getMd5sign() {
420 token = ''; 420 token = '';
421 } 421 }
422 var sortd = [ 422 var sortd = [
423 - { keyname: 'app_id', value: '0eca8f5373ca4866aec2f8e9d9367104' }, 423 + { keyname: 'app_id', value: _app_id },
424 { keyname: 'deviceInfo', value: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E' }, 424 { keyname: 'deviceInfo', value: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E' },
425 { keyname: 'salt', value: salt }, 425 { keyname: 'salt', value: salt },
426 { keyname: 'sign_type', value: 'md5' }, 426 { keyname: 'sign_type', value: 'md5' },
js/out.js 0 → 100644
  1 +var queryParams = null;//?参数名称
  2 +var $btnObj = null, $btnLoad = null;
  3 +
  4 +function inputDown() {
  5 + var numObj = getObjectByID("inputPhoneNum");
  6 + numObj.value = numObj.value.replace(/\D/g, '').replace(/^/, '$& ').replace(/....(?!$)/g, '$& ');
  7 +}
  8 +
  9 +window.onload = function () {
  10 + $btnObj = getObjectByID("btnPayOK");
  11 + $btnLoad = getObjectByID("loading");
  12 + $exChangeNum = getObjectByID("exChangeNum");
  13 + // $exChangeNum.onclick = exChangeNumClick;
  14 + queryParams = getQueryString(window.location);//获取url参数?sign=4&token=6&codeType=888
  15 + var ok = $btnObj;
  16 + ok.onclick = btnOkClick;
  17 + //初始化请求订单,有跳转选择支付,没有填入手机号
  18 + $inputCarNum = getObjectByID("inputCarNum");
  19 + $inputCarNum.onkeyup = checkCharAndNumber
  20 + //init();//初始化init
  21 +}
  22 +
  23 +function init() {
  24 + if (queryParams == null) {
  25 + var str = "没有接收到请求参数";
  26 + alertMsg(str);
  27 + console.log(str);
  28 + return;
  29 + }
  30 + var params = queryParams || {};
  31 + $btnObj.style.display = "none";
  32 + $btnLoad.style.display = "block";
  33 + params.payType = IsWeixinOrAlipay()//4:微信 1:支付宝
  34 + params.terminalSource = "7";//1:任你听 3:微信公共号 4:云平台 7:H5
  35 + //var tmpParams = Object.assign(params, window.webAppH5.comParams, window.webAppH5.appOut);
  36 + var tmpParams = Object.assign(params, window.webAppH5.comParams);
  37 + getRequest(webAppRoot + window.webAppH5.comServer, tmpParams, "init");
  38 +}
  39 +
  40 +//点击查询订单
  41 +function btnOkClick() {
  42 + window.location.href = "paybacknew.html?carNumber=" + getCarNumber();
  43 +
  44 +}
  45 +
  46 +//读取订单数据
  47 +function getRequest(url, params, init) {
  48 + var btnObj = $btnObj;
  49 + postRequest(url, params, function (res) {
  50 + btnObj.style.display = "block";
  51 + $btnLoad.style.display = "none";
  52 + if (res.code == 0) {//进场
  53 + //alertMsg("出场成功");
  54 + if (res.data) {
  55 + var tmpObj = res.data;
  56 + //判断是否需要支付
  57 + if (tmpObj.needPay) {
  58 + var queryParams = parseParams(tmpObj);
  59 + console.log(tmpObj)
  60 + window.location.href = "paybacknew.html?carNumber" + queryParams;
  61 + } else {
  62 + var tipStr = "无需缴费,欢迎下次光临";
  63 + sucessTip(tipStr);
  64 + alertMsg(tipStr);
  65 + }
  66 + //var tel = document.getElementById("inputPhoneNum").value.replace(/\s/g, "");//去除空格
  67 + //var orderFee = keepTwoDecimalFull((tmpObj.orderFee / 100));//本次出场实际应付金额(减去折扣,优惠券等之后的应付金额)
  68 + //var tmpUrl = "orderId=" + tmpObj.orderId + "&outtime=" + tmpObj.outtime + "&tel=" + tel + "&orderFee=" + orderFee;
  69 +
  70 + } else {
  71 + alertMsg("没有找到订单");
  72 + }
  73 + } else {//其他情况如【该卡号场内已存在】
  74 + console.log(res.message);
  75 + alertMsg(res.message);
  76 + if ((init) != "init") {
  77 + alertMsg(res.message);
  78 + }
  79 + document.getElementById("inputPhoneNum").focus();
  80 + }
  81 + }, function (err) {
  82 + console.log("网络服务超时..." + url);
  83 + alertMsg("网络服务超时");
  84 + btnObj.style.display = "block";
  85 + $btnLoad.style.display = "none";
  86 + });
  87 +}
  88 +
  89 +//直接无需缴费出场
  90 +function sucessTip(content) {
  91 + var obj = ["header", "footer"];
  92 + for (var i = 0; i < obj.length; i++) {
  93 + var tmpObj = document.getElementById("" + obj[i] + "");
  94 + tmpObj.style.display = "none";
  95 + }
  96 + document.getElementById("tipResult").style.display = "block";
  97 + document.getElementById("outTipContent").innerHTML = content;
  98 +}
  99 +
  100 +//获取查询条件值
  101 +function getCarNumber() {
  102 +
  103 + var tmpValue = "";
  104 + var tmpPhone = getObjectByID("inputPhoneNum");
  105 + var phoneNumBox = getObjectByID("phoneNumBox");//手机号
  106 + if (phoneNumBox.style.display === "block") {
  107 + tmpValue = tmpPhone.value.replace(/\s*/g, "") + '111';//去除空格
  108 + if (tmpValue == "" || tmpValue.length < 11) {
  109 + alertMsg("请输入正确的手机号码!");
  110 + tmpValue = "";
  111 + }
  112 + } else {
  113 + var tmpNum = getObjectByID("inputCarNum").value;
  114 + tmpValue = getObjectByID("selProvince").value + tmpNum;
  115 + if (tmpNum == "" || tmpNum == " ") {
  116 + alertMsg("车牌号不能为空!");
  117 + tmpValue = "";
  118 + }
  119 + }
  120 + console.log("查询值:" + tmpValue);
  121 + return tmpValue;
  122 +
  123 +}
js/pay.js
@@ -35,7 +35,6 @@ window.onload = function () { @@ -35,7 +35,6 @@ window.onload = function () {
35 if (webAppParams != null) { 35 if (webAppParams != null) {
36 console.log(webAppParams.carNumber) 36 console.log(webAppParams.carNumber)
37 37
38 -  
39 //设置UI参数 38 //设置UI参数
40 webAppClass.setUI(webAppParams); 39 webAppClass.setUI(webAppParams);
41 } else { 40 } else {
@@ -64,7 +63,7 @@ var webAppClass = { @@ -64,7 +63,7 @@ var webAppClass = {
64 console.log(webAppParams.orderId) 63 console.log(webAppParams.orderId)
65 var url = webAppRoot + window.webAppH5.discountServer; 64 var url = webAppRoot + window.webAppH5.discountServer;
66 var discountParams = { 65 var discountParams = {
67 - app_id: '1', 66 + app_id: _app_id,
68 salt: '1', 67 salt: '1',
69 deviceInfo: '1', 68 deviceInfo: '1',
70 sign_type: '1', 69 sign_type: '1',
@@ -78,7 +77,6 @@ var webAppClass = { @@ -78,7 +77,6 @@ var webAppClass = {
78 postRequest(url, discountParams, function (res) { 77 postRequest(url, discountParams, function (res) {
79 console.log(res) 78 console.log(res)
80 if (res.code == 0) { 79 if (res.code == 0) {
81 -  
82 document.getElementById("sumMoney").innerHTML = (res.data.orderFee / 100) 80 document.getElementById("sumMoney").innerHTML = (res.data.orderFee / 100)
83 document.getElementById("discountTip").innerHTML = res.data.couponDescribe 81 document.getElementById("discountTip").innerHTML = res.data.couponDescribe
84 document.getElementById("discountFee").innerHTML = (res.data.discountFee / 100) 82 document.getElementById("discountFee").innerHTML = (res.data.discountFee / 100)
@@ -130,7 +128,6 @@ var webAppClass = { @@ -130,7 +128,6 @@ var webAppClass = {
130 postRequest(url, discountParams, function (res) { 128 postRequest(url, discountParams, function (res) {
131 console.log(res) 129 console.log(res)
132 if (res.code == 0) { 130 if (res.code == 0) {
133 -  
134 document.getElementById("sumMoney").innerHTML = (res.data.orderFee / 100) 131 document.getElementById("sumMoney").innerHTML = (res.data.orderFee / 100)
135 document.getElementById("discountTip").innerHTML = res.data.couponDescribe 132 document.getElementById("discountTip").innerHTML = res.data.couponDescribe
136 document.getElementById("discountFee").innerHTML = (res.data.discountFee / 100) 133 document.getElementById("discountFee").innerHTML = (res.data.discountFee / 100)
@@ -185,7 +182,6 @@ var webAppClass = { @@ -185,7 +182,6 @@ var webAppClass = {
185 webAppParams = tmpObj;//重新赋值 182 webAppParams = tmpObj;//重新赋值
186 webAppClass.okPay(tmpObj);//唤醒支付 183 webAppClass.okPay(tmpObj);//唤醒支付
187 } 184 }
188 -  
189 console.log(tmpObj) 185 console.log(tmpObj)
190 // webAppClass.okPay(tmpObj);//唤醒支付 186 // webAppClass.okPay(tmpObj);//唤醒支付
191 } else { 187 } else {
@@ -238,19 +234,10 @@ var webAppClass = { @@ -238,19 +234,10 @@ var webAppClass = {
238 console.log(res) 234 console.log(res)
239 if (res.code == 0) { 235 if (res.code == 0) {
240 document.getElementById("paySuccess").style.display = 'block' 236 document.getElementById("paySuccess").style.display = 'block'
241 - //  
242 - // document.getElementById("sumMoney").innerHTML = (res.data.orderFee/100)  
243 - // document.getElementById("discountTip").innerHTML = res.data.couponDescribe  
244 - // document.getElementById("discountFee").innerHTML = (res.data.discountFee/100)  
245 - // document.getElementById("discountDesc").style.display="none"  
246 - // $btnLoad.style.display = "none";  
247 - // $btnObj.style.display = "block";  
248 - // document.getElementById("discountBox").setAttribute('readonly','readonly');  
249 - // flag = 1 237 +
250 } else { 238 } else {
251 alert(res.message) 239 alert(res.message)
252 - // $discountBtn.disabled = false  
253 - // document.getElementById("discountTip").innerHTML = res.message 240 +
254 } 241 }
255 }) 242 })
256 } else { 243 } else {
@@ -260,37 +247,7 @@ var webAppClass = { @@ -260,37 +247,7 @@ var webAppClass = {
260 //alert(clientType); 247 //alert(clientType);
261 switch (clientType) { 248 switch (clientType) {
262 case "wxPay"://微信[内置浏览器] 249 case "wxPay"://微信[内置浏览器]
263 - //var wxPay = webAppH5.wxPayServer;  
264 - //var wxParams = webAppH5.comParams;  
265 - //wxParams.orderId = orderID;  
266 - //wxParams.payType = 4;// 1:支付宝 2:微信 3:银联 10:H5 4微信公众号  
267 - //wxParams.terminalSource = 3;//请求端来源 1: 任你停 2:pda 3:微信公共号 7:H5扫码 10页面支付  
268 - //debugger;  
269 -  
270 -  
271 - // //新增start  
272 - //  
273 - // var url = " https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx20161110163838f231619da20804912345&package=1037687096";  
274 - // //window.location.href = url;  
275 - // var wxPay = webAppH5.wxPayServer;  
276 - // var wxParams = webAppH5.comParams;  
277 - // wxParams.carNumber = getQueryString(window.location).carnum;  
278 - // wxParams.orderId = orderID;  
279 - // wxParams.payType = 4;// 1:支付宝 2:微信 3:银联 10:H5 4微信公众号  
280 - // wxParams.terminalSource = 7;//请求端来源 1: 任你停 2:pda 3:微信公共号 7:H5扫码 10页面支付  
281 - //  
282 - // wxParams.paySrcType = getQueryString(window.location)._paySrcType;//101停车支付  
283 - //  
284 - // wxParams.recordArreaInfos= JSON.stringify([{"orderId":webAppParams.orderId,"orderNotPayFee":_mon*100,"parkId":getQueryString(window.location).parkCode}]);  
285 - //  
286 - // //新增end  
287 -  
288 - // if (webAppCode == null || webAppCode == "") {//code检测  
289 - // alertMsg(appState.codeNullTip);  
290 - // $btnObj.style.display = "block";  
291 - // $btnLoad.style.display = "none";  
292 - // return;  
293 - // } 250 +
294 webAppClass.payAjaxJDK(orderID); 251 webAppClass.payAjaxJDK(orderID);
295 console.log("wxPay");//微信支付 252 console.log("wxPay");//微信支付
296 break; 253 break;
@@ -471,7 +428,7 @@ var webAppClass = { @@ -471,7 +428,7 @@ var webAppClass = {
471 payAjaxJDK: function (orderID) { 428 payAjaxJDK: function (orderID) {
472 var btnOBj = $btnObj; 429 var btnOBj = $btnObj;
473 //0:页面初始化获取code[webAppCode] 430 //0:页面初始化获取code[webAppCode]
474 - var codeParams = {code: webAppCode, appId: appWxID}; 431 + var codeParams = { code: webAppCode, appId: appWxID };
475 var openIdUrl = webAppRoot + window.webAppH5.wxGetOpenIdServer; 432 var openIdUrl = webAppRoot + window.webAppH5.wxGetOpenIdServer;
476 433
477 //1:有code获取OpenId 434 //1:有code获取OpenId
@@ -510,10 +467,8 @@ var webAppClass = { @@ -510,10 +467,8 @@ var webAppClass = {
510 wxParams.terminalSource = 7;//请求端来源 1: 任你停 2:pda 3:微信公共号 7:H5扫码 10页面支付 467 wxParams.terminalSource = 7;//请求端来源 1: 任你停 2:pda 3:微信公共号 7:H5扫码 10页面支付
511 //webAppClass.payAjax(root + wxPay, wxParams); 468 //webAppClass.payAjax(root + wxPay, wxParams);
512 469
513 -  
514 //新增start 470 //新增start
515 471
516 -  
517 wxParams.carNumber = getQueryString(window.location).carnum; 472 wxParams.carNumber = getQueryString(window.location).carnum;
518 473
519 wxParams.paySrcType = getQueryString(window.location)._paySrcType;//101停车支付 474 wxParams.paySrcType = getQueryString(window.location)._paySrcType;//101停车支付
@@ -526,7 +481,6 @@ var webAppClass = { @@ -526,7 +481,6 @@ var webAppClass = {
526 481
527 //新增end 482 //新增end
528 483
529 -  
530 wxParams.openId = openId; 484 wxParams.openId = openId;
531 wxParams.appId = appWxID; 485 wxParams.appId = appWxID;
532 var payParamsUrl = webAppRoot + window.webAppH5.wxPayServer; 486 var payParamsUrl = webAppRoot + window.webAppH5.wxPayServer;
@@ -578,16 +532,13 @@ var webAppClass = { @@ -578,16 +532,13 @@ var webAppClass = {
578 // 使用以上方式判断前端返回,微信团队郑重提示: 532 // 使用以上方式判断前端返回,微信团队郑重提示:
579 //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。 533 //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
580 534
581 -  
582 -  
583 //window.location.href = webAppPayResult + "?trade_no=" + "success"; 535 //window.location.href = webAppPayResult + "?trade_no=" + "success";
584 window.history.go(-2); 536 window.history.go(-2);
585 - setTimeout(function(){ 537 + setTimeout(function () {
586 window.history.go(-2); 538 window.history.go(-2);
587 //var src = mUrl.Uri+'/WEB-INF/pages/select.html?openid='+func.openid+'&token='+func.token+"&";//mUrl.myParkCardView; 539 //var src = mUrl.Uri+'/WEB-INF/pages/select.html?openid='+func.openid+'&token='+func.token+"&";//mUrl.myParkCardView;
588 //window.location.href = src; 540 //window.location.href = src;
589 - },3000);  
590 - 541 + }, 3000);
591 542
592 } else if (res.err_msg == 'get_brand_wcpay_request:cancel') { 543 } else if (res.err_msg == 'get_brand_wcpay_request:cancel') {
593 window.location.href = webAppPayResult + "?trade_no=" + "fail"; 544 window.location.href = webAppPayResult + "?trade_no=" + "fail";
@@ -670,6 +621,5 @@ var webAppClass = { @@ -670,6 +621,5 @@ var webAppClass = {
670 } 621 }
671 }, 622 },
672 623
673 -  
674 } 624 }
675 625
js/paybacknew.js
  1 +
1 var fun = { 2 var fun = {
2 dateFormat: function (msd) { 3 dateFormat: function (msd) {
3 var time = msd 4 var time = msd
@@ -63,7 +64,7 @@ var fun = { @@ -63,7 +64,7 @@ var fun = {
63 token = ''; 64 token = '';
64 } 65 }
65 var jsondata = { 66 var jsondata = {
66 - app_id: "0eca8f5373ca4866aec2f8e9d9367104", 67 + app_id: _app_id,
67 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", 68 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E",
68 salt: salt, 69 salt: salt,
69 sign: fun.getMd5sign(), 70 sign: fun.getMd5sign(),
@@ -77,6 +78,7 @@ var fun = { @@ -77,6 +78,7 @@ var fun = {
77 carNumber: carNumber, 78 carNumber: carNumber,
78 79
79 } 80 }
  81 +
80 // console.log('查询单个的入参 ' + JSON.stringify(jsondata) + " 请求的接口" + mUrl.oneCardorder); 82 // console.log('查询单个的入参 ' + JSON.stringify(jsondata) + " 请求的接口" + mUrl.oneCardorder);
81 jsajax.defaultReq( 83 jsajax.defaultReq(
82 mUrl.oneCardorder, 84 mUrl.oneCardorder,
@@ -88,19 +90,10 @@ var fun = { @@ -88,19 +90,10 @@ var fun = {
88 setTimeout(function () { 90 setTimeout(function () {
89 var datas = data.data 91 var datas = data.data
90 console.log(datas) 92 console.log(datas)
91 - // var discountFee = datas.discountFee;//已优惠  
92 - // var discountDesc = datas.discountDesc;//已优惠  
93 - // var parkCode = datas.parkCode;  
94 - // var no = datas.orderId;//.no;//订单id  
95 - // var inparktime = datas.inparktime;//.inparktime;//进场时间  
96 - // var plateno = datas.plateno;//车牌号  
97 - // var parkName = datas.parkName;//停车场名称  
98 - // var staytime = datas.staytime;//停车时长 93 +
99 var due = datas.due;//总计费用 94 var due = datas.due;//总计费用
100 var unpaid = datas.unpaid;//待支付 95 var unpaid = datas.unpaid;//待支付
101 - // var paid = datas.paid;//实付  
102 - // var discountType = datas.discountType;  
103 - // 96 +
104 var discountFee; 97 var discountFee;
105 var discountDesc; 98 var discountDesc;
106 if (datas.discountFee && datas.discountFee != '' && datas.discountFee != undefined) { 99 if (datas.discountFee && datas.discountFee != '' && datas.discountFee != undefined) {
@@ -128,9 +121,7 @@ var fun = { @@ -128,9 +121,7 @@ var fun = {
128 + "&parkCode=" + parkCode 121 + "&parkCode=" + parkCode
129 + "&paySrcType=" + _paySrcType 122 + "&paySrcType=" + _paySrcType
130 123
131 - // + '&discountType=' + discountType  
132 - // + '&parkCode=' + parkCode  
133 - // + "&"; 124 +
134 console.log(src) 125 console.log(src)
135 window.location.assign(encodeURI(src)) 126 window.location.assign(encodeURI(src))
136 }, 100); 127 }, 100);
@@ -151,7 +142,7 @@ var fun = { @@ -151,7 +142,7 @@ var fun = {
151 var orderlist = fun.orderIds 142 var orderlist = fun.orderIds
152 var codes = "[" + fun.parkCodes + "]" 143 var codes = "[" + fun.parkCodes + "]"
153 var jsondata = { 144 var jsondata = {
154 - app_id: "0eca8f5373ca4866aec2f8e9d9367104", 145 + app_id: _app_id,
155 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", 146 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E",
156 salt: salt, 147 salt: salt,
157 sign: fun.getMd5sign(), 148 sign: fun.getMd5sign(),
@@ -177,11 +168,7 @@ var fun = { @@ -177,11 +168,7 @@ var fun = {
177 var discountFee = datas.arrearageDiscFee;//已优惠 168 var discountFee = datas.arrearageDiscFee;//已优惠
178 var discountDesc = datas.discDesc;//已优惠 169 var discountDesc = datas.discDesc;//已优惠
179 var carNumber = datas.carNumber; 170 var carNumber = datas.carNumber;
180 - // var no = datas.orderId;//.no;//订单id  
181 - // var inparktime = datas.inparktime;//.inparktime;//进场时间  
182 - // var plateno = datas.carNumber;//车牌号  
183 - // var parkName = datas.parkName;//停车场名称  
184 - // var staytime = datas.staytime;//停车时长 171 +
185 var due = datas.arrearageTotalFee;//总计费用 172 var due = datas.arrearageTotalFee;//总计费用
186 var unpaid = datas.arrearageActFee;//待支付 173 var unpaid = datas.arrearageActFee;//待支付
187 var paid = datas.arrearageActFee;//实付 174 var paid = datas.arrearageActFee;//实付
@@ -193,17 +180,12 @@ var fun = { @@ -193,17 +180,12 @@ var fun = {
193 discountDesc = datas.discountDesc;//已优惠 180 discountDesc = datas.discountDesc;//已优惠
194 } 181 }
195 } 182 }
196 -  
197 - //console.log('-------------------------------'+discountType);  
198 -  
199 var _num = datas.arrearageNum 183 var _num = datas.arrearageNum
200 var _paySrcType = 103 184 var _paySrcType = 103
201 185
202 //查询到车牌号订单信息 186 //查询到车牌号订单信息
203 var src = 'monPay.html?carnum=' + carNumber 187 var src = 'monPay.html?carnum=' + carNumber
204 - // + "&inparktime=" + inparktime  
205 - // + "&parkName=" + parkName  
206 - // + "&staytime=" + staytime 188 +
207 + "&due=" + due 189 + "&due=" + due
208 + "&unpaid=" + unpaid 190 + "&unpaid=" + unpaid
209 + "&paid=" + paid 191 + "&paid=" + paid
@@ -229,7 +211,7 @@ var fun = { @@ -229,7 +211,7 @@ var fun = {
229 token = ''; 211 token = '';
230 } 212 }
231 var sortd = [ 213 var sortd = [
232 - { keyname: 'app_id', value: '0eca8f5373ca4866aec2f8e9d9367104' }, 214 + { keyname: 'app_id', value: _app_id },
233 { keyname: 'deviceInfo', value: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E' }, 215 { keyname: 'deviceInfo', value: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E' },
234 { keyname: 'salt', value: salt }, 216 { keyname: 'salt', value: salt },
235 { keyname: 'sign_type', value: 'md5' }, 217 { keyname: 'sign_type', value: 'md5' },
@@ -249,7 +231,7 @@ var fun = { @@ -249,7 +231,7 @@ var fun = {
249 parkCodes: [], 231 parkCodes: [],
250 parkCodeArr: [], 232 parkCodeArr: [],
251 selectedMon: 0,//选中了总金额 233 selectedMon: 0,//选中了总金额
252 - flag:false, 234 + flag: false,
253 getQueryVariable: function (variable) { 235 getQueryVariable: function (variable) {
254 var query = window.location.search.substring(1); 236 var query = window.location.search.substring(1);
255 var vars = query.split("&"); 237 var vars = query.split("&");
@@ -290,7 +272,7 @@ var fun = { @@ -290,7 +272,7 @@ var fun = {
290 ' <p>出场时间:' + fun.inData[0].parkOutTime + '</p>\n' + 272 ' <p>出场时间:' + fun.inData[0].parkOutTime + '</p>\n' +
291 ' <p>停车时长:' + fun.dateFormat(fun.inData[0].parkDuration) + '</p>\n' + 273 ' <p>停车时长:' + fun.dateFormat(fun.inData[0].parkDuration) + '</p>\n' +
292 ' <span class="pay-money">' + ((fun.inData[0].unPayFee) / 100).toFixed(2) + '元</span>\n' + 274 ' <span class="pay-money">' + ((fun.inData[0].unPayFee) / 100).toFixed(2) + '元</span>\n' +
293 - '<p class="out-btn arrears-btn" data-orderId="'+fun.inData[0].orderId+'" data-money="'+fun.inData[0].unPayFee+'" data-carNumber="'+fun.inData[0].carNumber+'" data-parkCode="'+fun.inData[0].parkCode+'">申请离场' + 275 + '<p class="out-btn arrears-btn" data-orderId="' + fun.inData[0].orderId + '" data-money="' + fun.inData[0].unPayFee + '" data-carNumber="' + fun.inData[0].carNumber + '" data-parkCode="' + fun.inData[0].parkCode + '">申请离场' +
294 ' <span class="orderId" style="display: none" ' + 276 ' <span class="orderId" style="display: none" ' +
295 '>' + fun.inData[0].orderId + '</span>' + 277 '>' + fun.inData[0].orderId + '</span>' +
296 '</p>' + 278 '</p>' +
@@ -346,7 +328,6 @@ var fun = { @@ -346,7 +328,6 @@ var fun = {
346 } 328 }
347 }, 329 },
348 _initData: function () { 330 _initData: function () {
349 -  
350 var _carNumber = fun.getQueryVariable('carNumber') 331 var _carNumber = fun.getQueryVariable('carNumber')
351 console.log(_carNumber) 332 console.log(_carNumber)
352 333
@@ -357,7 +338,7 @@ var fun = { @@ -357,7 +338,7 @@ var fun = {
357 */ 338 */
358 var salt = jsajax.salt(32); 339 var salt = jsajax.salt(32);
359 var sortd = [ 340 var sortd = [
360 - { keyname: 'app_id', value: '0eca8f5373ca4866aec2f8e9d9367104' }, 341 + { keyname: 'app_id', value: _app_id },
361 { keyname: 'deviceInfo', value: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E' }, 342 { keyname: 'deviceInfo', value: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E' },
362 { keyname: 'salt', value: salt }, 343 { keyname: 'salt', value: salt },
363 { keyname: 'sign_type', value: 'md5' }, 344 { keyname: 'sign_type', value: 'md5' },
@@ -370,7 +351,7 @@ var fun = { @@ -370,7 +351,7 @@ var fun = {
370 ]; 351 ];
371 var md5sign = jsajax.getsign(sortd); 352 var md5sign = jsajax.getsign(sortd);
372 var jsondata = { 353 var jsondata = {
373 - app_id: "0eca8f5373ca4866aec2f8e9d9367104", 354 + app_id: _app_id,
374 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", 355 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E",
375 salt: salt, 356 salt: salt,
376 sign_type: "md5", 357 sign_type: "md5",
@@ -434,7 +415,7 @@ $(&#39;#check-btn&#39;).on(&#39;click&#39;, function () { @@ -434,7 +415,7 @@ $(&#39;#check-btn&#39;).on(&#39;click&#39;, function () {
434 }) 415 })
435 416
436 //......................... 单个选择操作 417 //......................... 单个选择操作
437 -$('#arrears-list').delegate('li','click', function () { 418 +$('#arrears-list').delegate('li', 'click', function () {
438 var mon = $(this).attr('data-unpayfee') 419 var mon = $(this).attr('data-unpayfee')
439 var orderid = $(this).attr('data-orderid') 420 var orderid = $(this).attr('data-orderid')
440 var parkcode = $(this).attr('data-parkcode') 421 var parkcode = $(this).attr('data-parkcode')
@@ -472,7 +453,7 @@ $(&#39;#arrears-list&#39;).delegate(&#39;li&#39;,&#39;click&#39;, function () { @@ -472,7 +453,7 @@ $(&#39;#arrears-list&#39;).delegate(&#39;li&#39;,&#39;click&#39;, function () {
472 453
473 //......................... 本次费用 454 //......................... 本次费用
474 $('#pay-wrap').on('click', function () { 455 $('#pay-wrap').on('click', function () {
475 - if(fun.flag){ 456 + if (fun.flag) {
476 return 457 return
477 } 458 }
478 var carNumber = $(this).attr('carNumber') 459 var carNumber = $(this).attr('carNumber')
@@ -496,26 +477,16 @@ $(&#39;#opr-btn&#39;).on(&#39;click&#39;, function () { @@ -496,26 +477,16 @@ $(&#39;#opr-btn&#39;).on(&#39;click&#39;, function () {
496 //......................... 免费离场 477 //......................... 免费离场
497 478
498 $(document).on('click', '.out-btn', function () { 479 $(document).on('click', '.out-btn', function () {
499 - // var _this = $(this).parent().parent().parent();  
500 -  
501 var money = $(this).attr('data-money') 480 var money = $(this).attr('data-money')
502 console.log(money) 481 console.log(money)
503 var _orderId = $(this).attr('data-orderId') 482 var _orderId = $(this).attr('data-orderId')
504 483
505 var carNumber = $(this).attr('data-carnumber') 484 var carNumber = $(this).attr('data-carnumber')
506 - //var parkCode = $(this).find('.parkCode').text()  
507 - // var orderId = _this.find('.orderId').text() 485 +
508 var parkCode = $(this).attr('data-parkcode') 486 var parkCode = $(this).attr('data-parkcode')
509 - // var carNumber = $(this).find('.carNumber').text()  
510 487
511 var paySrcType = '101' 488 var paySrcType = '101'
512 489
513 - // if(paySrcType == ''){  
514 - // paySrcType = 103  
515 - // }else{  
516 - // paySrcType = 101  
517 - // }  
518 - // alert(paySrcType)  
519 console.log(paySrcType) 490 console.log(paySrcType)
520 localStorage.setItem('paySrcType', paySrcType) 491 localStorage.setItem('paySrcType', paySrcType)
521 localStorage.setItem('parkCode', parkCode) 492 localStorage.setItem('parkCode', parkCode)
@@ -526,7 +497,7 @@ $(document).on(&#39;click&#39;, &#39;.out-btn&#39;, function () { @@ -526,7 +497,7 @@ $(document).on(&#39;click&#39;, &#39;.out-btn&#39;, function () {
526 token = ''; 497 token = '';
527 } 498 }
528 var jsondata = { 499 var jsondata = {
529 - app_id: "0eca8f5373ca4866aec2f8e9d9367104", 500 + app_id: _app_id,
530 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", 501 deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E",
531 salt: salt, 502 salt: salt,
532 sign: getMd5sign(), 503 sign: getMd5sign(),
@@ -546,7 +517,6 @@ $(document).on(&#39;click&#39;, &#39;.out-btn&#39;, function () { @@ -546,7 +517,6 @@ $(document).on(&#39;click&#39;, &#39;.out-btn&#39;, function () {
546 JSON.stringify(jsondata), 517 JSON.stringify(jsondata),
547 function (data) { 518 function (data) {
548 console.log(data) 519 console.log(data)
549 -  
550 if (data.code == '5005') { 520 if (data.code == '5005') {
551 getOneorder(carNumber, parkCode, _orderId) 521 getOneorder(carNumber, parkCode, _orderId)
552 522
@@ -555,28 +525,25 @@ $(document).on(&#39;click&#39;, &#39;.out-btn&#39;, function () { @@ -555,28 +525,25 @@ $(document).on(&#39;click&#39;, &#39;.out-btn&#39;, function () {
555 // window.location.href = 'zeroout.html' 525 // window.location.href = 'zeroout.html'
556 } 526 }
557 // alert(data.message) 527 // alert(data.message)
558 -  
559 }) 528 })
560 -  
561 }) 529 })
562 530
563 -$('.close-btn').on('click',function () { 531 +$('.close-btn').on('click', function () {
564 $('.dialog-out').hide() 532 $('.dialog-out').hide()
565 }) 533 })
566 534
567 -function getMd5sign()  
568 -{ 535 +function getMd5sign() {
569 var salt = jsajax.salt(32); 536 var salt = jsajax.salt(32);
570 var token = mUrl.GetToken(); 537 var token = mUrl.GetToken();
571 if (token == null) { 538 if (token == null) {
572 token = ''; 539 token = '';
573 } 540 }
574 var sortd = [ 541 var sortd = [
575 - {keyname:'app_id',value:'0eca8f5373ca4866aec2f8e9d9367104'},  
576 - {keyname:'deviceInfo',value:'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E'},  
577 - {keyname:'salt',value:salt},  
578 - {keyname:'sign_type',value:'md5'},  
579 - {keyname:'token',value:token} 542 + { keyname: 'app_id', value: _app_id },
  543 + { keyname: 'deviceInfo', value: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E' },
  544 + { keyname: 'salt', value: salt },
  545 + { keyname: 'sign_type', value: 'md5' },
  546 + { keyname: 'token', value: token }
580 ]; 547 ];
581 var md5sign = jsajax.getsign(sortd); 548 var md5sign = jsajax.getsign(sortd);
582 return md5sign; 549 return md5sign;
js/url.js
  1 +
  2 +
1 var mUrl = mUrl || {}; 3 var mUrl = mUrl || {};
2 4
3 5
@@ -87,9 +89,9 @@ mUrl.getJx = function(){ @@ -87,9 +89,9 @@ mUrl.getJx = function(){
87 89
88 /*end*/ 90 /*end*/
89 91
90 -// var cepath = 'http://39.98.58.92:8090'; 92 +var cepath = 'http://39.98.58.92:8090';
91 93
92 -var cepath = 'http://pay.service.renniting.cn/'; 94 +// var cepath = 'http://pay.service.renniting.cn/';
93 // http://pay.service.huangshiparking.com 95 // http://pay.service.huangshiparking.com
94 96
95 /*----------------------------------------------登录登出绑定手机号 start*/ 97 /*----------------------------------------------登录登出绑定手机号 start*/
list.html
@@ -126,7 +126,7 @@ function activityQuery() { @@ -126,7 +126,7 @@ function activityQuery() {
126 // mUrl.activity = cepath + '/activity/queryActivityListByOrgId' 126 // mUrl.activity = cepath + '/activity/queryActivityListByOrgId'
127 var salt = jsajax.salt(32); 127 var salt = jsajax.salt(32);
128 var jsondata = { 128 var jsondata = {
129 - app_id: '0eca8f5373ca4866aec2f8e9d9367104', 129 + app_id: _app_id,
130 deviceInfo: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E', 130 deviceInfo: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E',
131 salt: salt, 131 salt: salt,
132 sign_type: 'md5', 132 sign_type: 'md5',
monPay.html
@@ -113,7 +113,7 @@ @@ -113,7 +113,7 @@
113 <script src="js/jquery-3.2.1.min.js"></script> 113 <script src="js/jquery-3.2.1.min.js"></script>
114 <script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/jquery-weui.min.js"></script> 114 <script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/jquery-weui.min.js"></script>
115 <script src="js/config.js?a=1213"></script> 115 <script src="js/config.js?a=1213"></script>
116 -<script src="js/common.js?f=3.51"></script> 116 +<script src="js/common.js?f=1.51"></script>
117 <!--<script src="js/jweixin-1.0.0.js?v=0.1"></script>--> 117 <!--<script src="js/jweixin-1.0.0.js?v=0.1"></script>-->
118 <script src="js/monPay.js?b=0.1"></script> 118 <script src="js/monPay.js?b=0.1"></script>
119 </body> 119 </body>
out.html
@@ -26,8 +26,9 @@ @@ -26,8 +26,9 @@
26 margin: 0; 26 margin: 0;
27 padding: 0; 27 padding: 0;
28 font-family: 'Microsoft YaHei'; 28 font-family: 'Microsoft YaHei';
29 - font-size:62.5%; /*1rem=10px*/ 29 + font-size: 62.5%; /*1rem=10px*/
30 } 30 }
  31 +
31 #header { 32 #header {
32 margin-top: 25%; 33 margin-top: 25%;
33 display: flex; 34 display: flex;
@@ -39,23 +40,27 @@ @@ -39,23 +40,27 @@
39 .phoneText { 40 .phoneText {
40 font-size: 18px; 41 font-size: 18px;
41 } 42 }
  43 +
42 .inputBox { 44 .inputBox {
43 position: relative; 45 position: relative;
44 font-size: 16px; 46 font-size: 16px;
45 margin-top: 20px; 47 margin-top: 20px;
46 } 48 }
  49 +
47 .subLabel { 50 .subLabel {
48 position: absolute; 51 position: absolute;
49 left: 0px; 52 left: 0px;
50 top: 5px; 53 top: 5px;
51 - padding:5px; 54 + padding: 5px;
52 } 55 }
  56 +
53 .subLabel > span { 57 .subLabel > span {
54 color: #5eb2c0; 58 color: #5eb2c0;
55 } 59 }
56 - #inputPhoneNum ,#inputCarNum{  
57 - transition: all 0.30s ease-in-out; <!-- -->  
58 - -webkit-transition: all 0.30s ease-in-out; 60 +
  61 + #inputPhoneNum, #inputCarNum {
  62 + transition: all 0.30s ease-in-out;
  63 + <!-- --> -webkit-transition: all 0.30s ease-in-out;
59 -moz-transition: all 0.30s ease-in-out; 64 -moz-transition: all 0.30s ease-in-out;
60 border: #c1bfc5 1px solid; 65 border: #c1bfc5 1px solid;
61 border-radius: 3px; 66 border-radius: 3px;
@@ -66,7 +71,7 @@ @@ -66,7 +71,7 @@
66 padding: 5px; 71 padding: 5px;
67 padding-left: 60px; 72 padding-left: 60px;
68 font-size: 18px; 73 font-size: 18px;
69 - color:#ff6f16; 74 + color: #ff6f16;
70 } 75 }
71 76
72 #inputPhoneNum:focus { 77 #inputPhoneNum:focus {
@@ -74,8 +79,9 @@ @@ -74,8 +79,9 @@
74 -webkit-box-shadow: 0 0 5px rgba(81, 203, 238, 1); 79 -webkit-box-shadow: 0 0 5px rgba(81, 203, 238, 1);
75 -moz-box-shadow: 0 0 5px rgba(81, 203, 238, 1); 80 -moz-box-shadow: 0 0 5px rgba(81, 203, 238, 1);
76 } 81 }
  82 +
77 .btnOK { 83 .btnOK {
78 - background:#75cbbe; 84 + background: #75cbbe;
79 width: 230px; 85 width: 230px;
80 height: 3rem; 86 height: 3rem;
81 line-height: 3rem; 87 line-height: 3rem;
@@ -85,20 +91,20 @@ @@ -85,20 +91,20 @@
85 font-size: 1.2rem; 91 font-size: 1.2rem;
86 cursor: pointer; 92 cursor: pointer;
87 } 93 }
  94 +
88 .flexBoxRow { 95 .flexBoxRow {
89 display: flex; 96 display: flex;
90 justify-content: left; 97 justify-content: left;
91 - flex-direction:row;  
92 - align-items:center;  
93 - width:100%; 98 + flex-direction: row;
  99 + align-items: center;
  100 + width: 100%;
94 } 101 }
  102 +
95 #footer { 103 #footer {
96 - justify-content:center !important;  
97 - padding-top:2rem; 104 + justify-content: center !important;
  105 + padding-top: 2rem;
98 } 106 }
99 107
100 -  
101 -  
102 #tipResult { 108 #tipResult {
103 display: none; 109 display: none;
104 font-size: 2rem; 110 font-size: 2rem;
@@ -108,9 +114,11 @@ @@ -108,9 +114,11 @@
108 text-align: center; 114 text-align: center;
109 padding: 10px; 115 padding: 10px;
110 } 116 }
  117 +
111 .input_province { 118 .input_province {
112 - font-size:1.4rem; 119 + font-size: 1.4rem;
113 } 120 }
  121 +
114 .input_province:after { 122 .input_province:after {
115 content: " "; 123 content: " ";
116 position: absolute; 124 position: absolute;
@@ -120,219 +128,60 @@ @@ -120,219 +128,60 @@
120 height: 90%; 128 height: 90%;
121 background: #5eb2c0; 129 background: #5eb2c0;
122 } 130 }
  131 +
123 #carNumBox { 132 #carNumBox {
124 position: relative; 133 position: relative;
125 } 134 }
  135 +
126 .splitLine2 { 136 .splitLine2 {
127 color: #5eb2c0; 137 color: #5eb2c0;
128 position: absolute; 138 position: absolute;
129 left: 40px; 139 left: 40px;
130 bottom: 11px; 140 bottom: 11px;
131 } 141 }
  142 +
132 #exChangeNum { 143 #exChangeNum {
133 - margin-top: 1rem;cursor: pointer; 144 + margin-top: 1rem;
  145 + cursor: pointer;
134 } 146 }
135 </style> 147 </style>
136 </head> 148 </head>
137 <body style="background-color: #f0f4f5;"> 149 <body style="background-color: #f0f4f5;">
138 -<!--<noscript>-->  
139 -<!--You need to enable JavaScript to run this app.-->  
140 -<!--</noscript>-->  
141 -<header id="header" style="margin-top:20%; display: flex; justify-content: center; align-items: center; flex-direction: column; "> 150 +
  151 +<header id="header"
  152 + style="margin-top:20%; display: flex; justify-content: center; align-items: center; flex-direction: column; ">
142 <span class="phoneText" id="phoneText">请输入车牌号</span> 153 <span class="phoneText" id="phoneText">请输入车牌号</span>
143 <div class="inputBox"> 154 <div class="inputBox">
144 <div id="phoneNumBox" style="display:none;"> 155 <div id="phoneNumBox" style="display:none;">
145 <div class="subLabel">+86 <span> |</span></div> 156 <div class="subLabel">+86 <span> |</span></div>
146 - <input type="tel" id="inputPhoneNum" value="" onkeydown="inputDown();" placeholder="请输入手机号码" maxlength="14" onpaste="return false" style="display:block;" /> 157 + <input type="tel" id="inputPhoneNum" value="" onkeydown="inputDown();" placeholder="请输入手机号码" maxlength="14"
  158 + onpaste="return false" style="display:block;"/>
147 </div> 159 </div>
148 <div id="carNumBox" style="display:block;" class="flexBoxRow"> 160 <div id="carNumBox" style="display:block;" class="flexBoxRow">
149 - <input class="input_province" type="text" readonly="readonly" maxlength="1" id="selProvince" onclick="provinceSelect();" value="蒙"> 161 + <input class="input_province" type="text" readonly="readonly" maxlength="1" id="selProvince"
  162 + onclick="provinceSelect();" value="蒙">
150 <span class="splitLine2"> |</span> 163 <span class="splitLine2"> |</span>
151 - <input type="text" maxlength="10" name="inputCarNum" id="inputCarNum" /> 164 + <input type="text" maxlength="10" name="inputCarNum" id="inputCarNum"/>
152 </div> 165 </div>
153 </div> 166 </div>
154 167
155 </header> 168 </header>
156 <footer id="footer" class="flexBoxRow"> 169 <footer id="footer" class="flexBoxRow">
157 <div class="btnOK" id="btnPayOK" disabled="disabled">获取订单</div> 170 <div class="btnOK" id="btnPayOK" disabled="disabled">获取订单</div>
158 - <img src="img/loading.gif" id="loading" style="display: none;" /> 171 + <img src="img/loading.gif" id="loading" style="display: none;"/>
159 </footer> 172 </footer>
160 <section id="tipResult" style="display:none;"> 173 <section id="tipResult" style="display:none;">
161 <img src="img/by.png" style="width:220px;height:110px;"/> 174 <img src="img/by.png" style="width:220px;height:110px;"/>
162 <div id="outTipContent"></div> 175 <div id="outTipContent"></div>
163 </section> 176 </section>
164 -<div id="id_keyboard_province"> </div>  
165 -<!--  
166 - This HTML file is a template.  
167 - If you open it directly in the browser, you will see an empty page. 177 +<div id="id_keyboard_province"></div>
168 178
169 - You can add webfonts, meta tags, or analytics to this file.  
170 - The build step will place the bundled scripts into the <body> tag.  
171 -  
172 - To begin the development, run `npm start` or `yarn start`.  
173 - To create a production bundle, use `npm run build` or `yarn build`.  
174 --->  
175 -<script type="text/javascript">  
176 -var queryParams = null;//?参数名称  
177 -var $btnObj = null, $btnLoad = null;  
178 -function inputDown() {  
179 - var numObj = getObjectByID("inputPhoneNum");  
180 - numObj.value = numObj.value.replace(/\D/g, '').replace(/^/, '$& ').replace(/....(?!$)/g, '$& ');  
181 -}  
182 -window.onload = function () {  
183 - $btnObj = getObjectByID("btnPayOK");  
184 - $btnLoad = getObjectByID("loading");  
185 - $exChangeNum = getObjectByID("exChangeNum");  
186 - // $exChangeNum.onclick = exChangeNumClick;  
187 - queryParams = getQueryString(window.location);//获取url参数?sign=4&token=6&codeType=888  
188 - var ok = $btnObj;  
189 - ok.onclick = btnOkClick;  
190 - //初始化请求订单,有跳转选择支付,没有填入手机号  
191 - $inputCarNum = getObjectByID("inputCarNum");  
192 - $inputCarNum.onkeyup = checkCharAndNumber  
193 - //init();//初始化init  
194 -}  
195 -function init() {  
196 - if (queryParams == null) {  
197 - var str = "没有接收到请求参数"; alertMsg(str); console.log(str); return;  
198 - }  
199 - var params = queryParams || {};  
200 - $btnObj.style.display = "none";  
201 - $btnLoad.style.display = "block";  
202 - params.payType = IsWeixinOrAlipay()//4:微信 1:支付宝  
203 - params.terminalSource = "7";//1:任你听 3:微信公共号 4:云平台 7:H5  
204 - //var tmpParams = Object.assign(params, window.webAppH5.comParams, window.webAppH5.appOut);  
205 - var tmpParams = Object.assign(params, window.webAppH5.comParams);  
206 - getRequest(webAppRoot + window.webAppH5.comServer, tmpParams, "init");  
207 -}  
208 -//点击查询订单  
209 -function btnOkClick() {  
210 - window.location.href = "paybacknew.html?carNumber=" + getCarNumber();  
211 -  
212 -// //var phoneNum = document.getElementById("inputPhoneNum").value.replace(/\s*/g, "");//去除空格  
213 -// if (queryParams == null) {  
214 -// var str = "没有接收到请求参数"; alertMsg(str); console.log(str); return;  
215 -// }  
216 -// $btnObj.style.display = "none";  
217 -// $btnLoad.style.display = "block";  
218 -// var params = queryParams || {};  
219 -// //获取当前选中手机号或车牌号  
220 -// params.carNumber = getCarNumber();//手机号  
221 -// if (params.carNumber == "") {  
222 -// $btnObj.style.display = "block"; $btnLoad.style.display = "none";  
223 -// return;  
224 -// }  
225 -// params.terminalSource = "7";//1:任你听 3:微信公共号 4:云平台 7:H5  
226 -// params.payType = IsWeixinOrAlipay()//4:微信 1:支付宝  
227 -// //var tmpParams = Object.assign(params, window.webAppH5.comParams, window.webAppH5.appOut);  
228 -// var tmpParams = Object.assign(params, window.webAppH5.comParams);  
229 -// getRequest(webAppRoot + window.webAppH5.comServer, tmpParams, "okClick");  
230 -}  
231 -  
232 -//读取订单数据  
233 -function getRequest(url, params, init) {  
234 - var btnObj = $btnObj;  
235 - postRequest(url, params, function (res) {  
236 - btnObj.style.display = "block";  
237 - $btnLoad.style.display = "none";  
238 - if (res.code == 0) {//进场  
239 - //alertMsg("出场成功");  
240 - if (res.data) {  
241 - var tmpObj = res.data;  
242 - //判断是否需要支付  
243 - if (tmpObj.needPay) {  
244 - var queryParams = parseParams(tmpObj);  
245 - console.log(tmpObj)  
246 - window.location.href = "paybacknew.html?carNumber" + queryParams;  
247 - } else {  
248 - var tipStr = "无需缴费,欢迎下次光临";  
249 - sucessTip(tipStr); alertMsg(tipStr);  
250 - }  
251 - //var tel = document.getElementById("inputPhoneNum").value.replace(/\s/g, "");//去除空格  
252 - //var orderFee = keepTwoDecimalFull((tmpObj.orderFee / 100));//本次出场实际应付金额(减去折扣,优惠券等之后的应付金额)  
253 - //var tmpUrl = "orderId=" + tmpObj.orderId + "&outtime=" + tmpObj.outtime + "&tel=" + tel + "&orderFee=" + orderFee;  
254 179
255 - } else {  
256 - alertMsg("没有找到订单");  
257 - }  
258 - } else {//其他情况如【该卡号场内已存在】  
259 - console.log(res.message); alertMsg(res.message);  
260 - if ((init) != "init") {  
261 - alertMsg(res.message);  
262 - }  
263 - document.getElementById("inputPhoneNum").focus();  
264 - }  
265 - }, function (err) {  
266 - console.log("网络服务超时..." + url);  
267 - alertMsg("网络服务超时");  
268 - btnObj.style.display = "block";  
269 - $btnLoad.style.display = "none";  
270 - });  
271 -}  
272 -//直接无需缴费出场  
273 -function sucessTip(content) {  
274 - var obj = ["header", "footer"];  
275 - for (var i = 0; i < obj.length; i++) {  
276 - var tmpObj = document.getElementById("" + obj[i] + "");  
277 - tmpObj.style.display = "none";  
278 - }  
279 - document.getElementById("tipResult").style.display = "block";  
280 - document.getElementById("outTipContent").innerHTML = content;  
281 -}  
282 -  
283 -  
284 -//获取查询条件值  
285 -function getCarNumber() {  
286 - // var tmpValue = "";  
287 - // var tmpPhone = getObjectByID("inputPhoneNum");  
288 - // var state = tmpPhone.style.display == "block" ? true : false;  
289 - // if (state) {//默认手机号  
290 - // tmpValue = tmpPhone.value.replace(/\s*/g, "")+'111';//去除空格  
291 - // if (tmpValue == "" || tmpValue.length < 11) {  
292 - // alertMsg("请输入正确的手机号码!");  
293 - // tmpValue = "";  
294 - // }  
295 - // } else {//车牌号  
296 - // var tmpNum = getObjectByID("inputCarNum").value;  
297 - // tmpValue = getObjectByID("selProvince").value + tmpNum;  
298 - // if (tmpNum == "" || tmpNum == " ") {  
299 - // alertMsg("车牌号不能为空!");  
300 - // tmpValue = "";  
301 - // }  
302 - //  
303 - //  
304 - //  
305 - // }  
306 - // console.log("查询值:" + tmpValue);  
307 - // return tmpValue;  
308 -  
309 -  
310 -  
311 - var tmpValue = "";  
312 - var tmpPhone = getObjectByID("inputPhoneNum");  
313 - var phoneNumBox = getObjectByID("phoneNumBox");//手机号  
314 - if(phoneNumBox.style.display === "block"){  
315 - tmpValue = tmpPhone.value.replace(/\s*/g, "")+'111';//去除空格  
316 - if (tmpValue == "" || tmpValue.length < 11) {  
317 - alertMsg("请输入正确的手机号码!");  
318 - tmpValue = "";  
319 - }  
320 - }else{  
321 - var tmpNum = getObjectByID("inputCarNum").value;  
322 - tmpValue = getObjectByID("selProvince").value + tmpNum;  
323 - if (tmpNum == "" || tmpNum == " ") {  
324 - alertMsg("车牌号不能为空!");  
325 - tmpValue = "";  
326 - }  
327 - }  
328 - console.log("查询值:" + tmpValue);  
329 - return tmpValue;  
330 -  
331 -}  
332 -</script>  
333 180
334 <script src="js/jquery-3.2.1.min.js"></script> 181 <script src="js/jquery-3.2.1.min.js"></script>
335 <script src="js/provinceKey.js?v=0.1"></script> 182 <script src="js/provinceKey.js?v=0.1"></script>
  183 +<script src="js/out.js?v=0.1"></script>
  184 +
336 </body> 185 </body>
337 186
338 187
paybacknew.html
@@ -214,8 +214,8 @@ @@ -214,8 +214,8 @@
214 214
215 <script src="js/md5.min.js"></script> 215 <script src="js/md5.min.js"></script>
216 216
217 -<script src="js/url.js?a=1213"></script>  
218 -<script src="js/ajax.js?a=1213"></script> 217 +<script src="js/url.js?a=1"></script>
  218 +<script src="js/ajax.js?a=0.1"></script>
219 <script type="text/javascript"> 219 <script type="text/javascript">
220 //微信浏览器中,aler弹框不显示域名 220 //微信浏览器中,aler弹框不显示域名
221 (function(){ 221 (function(){
@@ -234,6 +234,6 @@ @@ -234,6 +234,6 @@
234 } 234 }
235 })(); 235 })();
236 </script> 236 </script>
237 -<script src="js/paybacknew.js?a=4.1101"></script> 237 +<script src="js/paybacknew.js?a=1.1"></script>
238 </body> 238 </body>
239 </html> 239 </html>