diff --git a/js/ajax.js b/js/ajax.js index ed9b612..619fef6 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -1,321 +1 @@ - -window.onload = function () { - document.onkeydown = function () { - var e = window.event || arguments[0]; - //屏蔽F12 - if (e.keyCode == 123) { - - return false; - //屏蔽Ctrl+Shift+I - } else if ((e.ctrlKey) && (e.shiftKey) && (e.keyCode == 73)) { - - return false; - //屏蔽Shift+F10 - } else if ((e.shiftKey) && (e.keyCode == 121)) { - return false; - } - }; - //屏蔽右键单击 - document.oncontextmenu = function () { - return false; - } -} - -var _app_id = 'ud8yq5tv0inxupc05xfeau39jywlqoj2' -var jsajax = jsajax || {}; -//任你停赤峰 -jsajax.appID = 'wx945eccc8163fd75b'; -//获取openid -jsajax.getopenid = function (code,fn) { - var openid = ''; - var jsondata = { - appId:jsajax.appID, - code:code - }; - jsajax.defaultReq( - mUrl.tcgetopenid, - JSON.stringify(jsondata), - function(data){ - console.log("根据code获取openid"+JSON.stringify(data)); - if(data.code=='0'){ - openid = data.data; - mUrl.SetOpenid(openid); - mUrl.setApporWX('wx'); - console.log("用户 openid "+openid); - fn(openid); - } - } - ); -} -//获取token -jsajax.gett = function (openid,fn) { - var jsondata = { - openid:openid, - deviceInfo:"BC0703A4-AFB0-4B51-9089-9B7487C0CC6E" - } - jsajax.defaultReq( - mUrl.tcgettoken, - JSON.stringify(jsondata), - function (data) { - console.log('执行获取token的接口 '+JSON.stringify(data)); - if(data.code==0){ - console.log("用户 token "+data.data.token); - mUrl.SetToken(data.data.token); - mUrl.SetPhone(data.data.phoneNum); - fn(1); - }else{ - fn(0); - //location.href = mUrl.Uri+'/WEB-INF/pages/elsepages/common_pages/paybind.html; - } - } - ); -} -/*获取设备 start*/ - -jsajax.setstyle = function(){ - - var pt = ''; - if(mUrl.getApporWX()&&mUrl.getApporWX()!=''){ - pt = mUrl.getApporWX(); - } -// alert('clapntemp_获取到用户openid'+mUrl.getApporWX()); - - if(pt!=''){ - if(pt=='iosapp'||pt=='andriodapp'){ - if($('.qihuan')){ - $('.qihuan').addClass('iosapp'); - } - - } - } - console.log('执行米 '+pt); -} -jsajax.setstyle(); - - - -/*根据不同的类型加载不同的文件 start*/ -jsajax.dynamicLoading = { - css: function(path){ - if(!path || path.length === 0){ - throw new Error('argument "path" is required !'); - } - var head = document.getElementsByTagName('head')[0]; - var link = document.createElement('link'); - link.href = path; - link.rel = 'stylesheet'; - link.type = 'text/css'; - head.appendChild(link); - }, - js: function(path){ - if(!path || path.length === 0){ - throw new Error('argument "path" is required !'); - } - var head = document.getElementsByTagName('head')[0]; - var script = document.createElement('script'); - script.src = path; - script.type = 'text/javascript'; - head.appendChild(script); - } -} - -jsajax.setcss = function(strpath){ - var wxorapp = mUrl.getApporWX(); - console.log('这里先获取 '+wxorapp); - if(wxorapp){ - if(wxorapp!='wx'){ - console.log('不是微信微信'); - if(strpath){ - jsajax.dynamicLoading.css(strpath); - } - - }else{ - //jsajax.dynamicLoading.css("n1.css"); - //console.log('dengyu微信'); - } - }else{ - jsajax.dynamicLoading.css(strpath); - } -}; - -/* 默认请求*/ -jsajax.defaultReq=function(url, data, successfn,errorfn) { - data = (data==null || data=="" || typeof(data)=="undefined")? {"date": new Date().getTime()} : data; - $.ajax({ - type: "post", - data: data, - url: url, - dataType: "json", - contentType:'application/json;charset=utf-8', - beforeSend:function(xhr){}, - success: function(d){ - successfn(d); - }, - error: function(e){ - //alert(JSON.stringify(e)); - console.log(JSON.stringify(e)); - if (typeof (errorfn) != "undefined") { - errorfn(JSON.stringify(e)); - } - }, - complete:function (e) {} - }); -} -/* 车牌号校验.
*/ -jsajax.isVehicleNumber=function(vehicleNumber){ - var result = false; - if (vehicleNumber.length == 7){ - var express = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/; - result = express.test(vehicleNumber); - } - return result; -} - -//获取签名 -jsajax.getsign = function(objb){ - var compare = function (obj1, obj2) { - var val1 = obj1.keyname; - var val2 = obj2.keyname; - if (val1 < val2) { - return -1; - } else if (val1 > val2) { - return 1; - } else { - return 0; - } - } - objb.sort(compare); - var strmd5 = '14318527b13840c2a4af63fef52c2d6e'; - for(var i=0;i'+strmd5); - strmd5 = md5(strmd5); - strmd5=strmd5.toUpperCase(); - return strmd5; -} -//获取盐值 -jsajax.salt=function(a){ - var len = parseInt(a); - var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; - var maxPos = $chars.length; - var pwd = ''; -   for (var i = 0; i < len; i++) { -       pwd += $chars.charAt(Math.floor(Math.random() * maxPos)); -   } - console.log(pwd); -   return pwd; -} - -//金额转换(分转化成元) -jsajax.fenToYuan=function(fen){ - if( fen == null || fen.length<=0 || isNaN(fen) == true){ - return ""; - } - var yuan = Math.round(fen); - yuan = yuan.toString(); - var before = yuan.substr(0, yuan.length - 2); - - var end = yuan.substr(yuan.length - 2, 2); - before = before.toString(); - end = end.toString(); - if(before==''){ - before = '0'; - } - if(fen<10){ - end = '0'+end; - } - yuan = before + "." + end; - var re = /(-?\d+)(\d{3})/; - while (re.test(yuan)) { - yuan = yuan.replace(re, "$1,$2") - } - return yuan; -} -function isAndroidorios(fn){ - var u = navigator.userAgent, app = navigator.appVersion; - var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器 - var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 - isAndroid==true?true:false; - var jixing = ''; - if(isAndroid){jixing = 'android';}else if(isiOS){ - jixing = 'ios'; - } - fn(jixing); -} -//时间转化 秒转分 -jsajax.formatSeconds = function (value) { - var theTime = parseInt(value);// 秒 - var theTime1 = 0;// 分 - var theTime2 = 0;// 小时 - var result = ''; - var day = parseInt(theTime/(60*60*24)); - var hours = parseInt(theTime/(60*60) - day*24); - var fen = parseInt(theTime/60 -hours*60 - day*24*60); - var senc = parseInt(theTime -fen*60 -hours*60*60 - day*24*60*60); - if(day>0){result +=day+'天';} - if(hours>0){result +=hours+'小时';} - if(fen>0){result +=fen+'分';} - if(senc>0){result +=senc+'秒';} - return result; -} - -jsajax.fStohours = function (value) { - var theTime = parseInt(value);// 秒 - var theTime1 = 0;// 分 - var theTime2 = 0;// 小时 - if(theTime > 60) { - theTime1 = parseInt(theTime/60); - theTime = parseInt(theTime%60); - if(theTime1 > 60) { - theTime2 = parseInt(theTime1/60); - theTime1 = parseInt(theTime1%60); - } - } - var result = "";//+parseInt(theTime)+"秒"; - if(theTime1 > 0) { - result = ""+parseInt(theTime1)+"分"+result; - } - if(theTime2 > 0) { - result = ""+parseInt(theTime2)+"小时"+result; - } - return result; -} -//为Date类型拓展一个format方法,用于格式化日期 -Date.prototype.format = function (format) //author: meizz -{ - var o = { - "M+": this.getMonth() + 1, //month - "d+": this.getDate(), //day - "h+": this.getHours(), //hour - "m+": this.getMinutes(), //minute - "s+": this.getSeconds(), //second - "q+": Math.floor((this.getMonth() + 3) / 3), //quarter - "S": this.getMilliseconds() //millisecond - }; - if (/(y+)/.test(format)) - format = format.replace(RegExp.$1, - (this.getFullYear() + "").substr(4 - RegExp.$1.length)); - for (var k in o) - if (new RegExp("(" + k + ")").test(format)) - format = format.replace(RegExp.$1, - RegExp.$1.length == 1 ? o[k] : - ("00" + o[k]).substr(("" + o[k]).length)); - return format; -}; - -//时间格式的返回 -Date.prototype.toLocaleString = function() { - var se = this.getSeconds(); - var fz = this.getMinutes(); - if(se>=0&&se<=9){ - se = '0'+se; - } - if(fz>=0&&fz<=9){ - fz = '0'+fz; - } - return this.getFullYear() + "/" + (this.getMonth() + 1) + "/" + this.getDate() + " " + this.getHours() + ":" + fz + ":" + se; -}; +eval(function(p,a,c,k,e,d){e=function(c){return(c35?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}('5 28(a){j d,e,f,b=1f.27;1f.29,d=b.1g("2a")>-1||b.1g("2b")>-1,e=!!b.26(/\\(i[^;]+;( U;)? 25.+20 1Z X/),f="",d?f="21":e&&(f="22"),a(f)}j 1d,6;1h.23=5(){w.2c=5(){j a=1h.2d||2l[0];o 2m==a.P?!1:a.2n&&a.1e&&2o==a.P?!1:a.1e&&2k==a.P?!1:2j 0},w.2f=5(){o!1}},1d="2e",6=6||{},6.19="2g",6.2h=5(a,b){j c="",d={1Y:6.19,J:a};6.T(r.2p,v.x(d),5(a){t.u("根据J获取12"+v.x(a)),"0"==a.J&&(c=a.B,r.1T(c),r.1G("1s"),t.u("用户 12 "+c),b(c))})},6.1F=5(a,b){j c={12:a,1H:"1I-1E-1K-1B-1D"};6.T(r.1C,v.x(c),5(a){t.u("执行获取K的接口 "+v.x(a)),0==a.J?(t.u("用户 K "+a.B.K),r.1J(a.B.K),r.1L(a.B.1U),b(1)):b(0)})},6.1c=5(){j a="";r.D()&&""!=r.D()&&(a=r.D()),""!=a&&("1b"==a||"1V"==a)&&$(".1a")&&$(".1a").1W("1b"),t.u("执行米 "+a)},6.1c(),6.R={E:5(a){j b,c;L(!a||0===a.p)1i H 1j(\'1p "1q" 18 1r !\');b=w.1o("1n")[0],c=w.1k("1R"),c.1N=a,c.1M="1O",c.W="1l/E",b.1m(c)},1P:5(a){j b,c;L(!a||0===a.p)1i H 1j(\'1p "1q" 18 1r !\');b=w.1o("1n")[0],c=w.1k("2R"),c.2P=a,c.W="1l/2M",b.1m(c)}},6.2S=5(a){j b=r.D();t.u("这里先获取 "+b),b?"1s"!=b&&(t.u("不是微信微信"),a&&6.R.E(a)):6.R.E(a)},6.T=5(a,b,c,d){b=V==b||""==b||"17"==16 b?{2I:(H 11).2J()}:b,$.2w({W:"2y",B:b,2v:a,2u:"1t",2r:"2s/1t;2t=2z-8",2G:5(){},2H:5(a){c(a)},2F:5(a){t.u(v.x(a)),"17"!=16 d&&d(v.x(a))},2B:5(){}})},6.2A=5(a){j c,b=!1;o 7==a.p&&(c=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-15-9]{4}[A-15-9挂学警港澳]{1}$/,b=c.C(a)),b},6.2x=5(a){j c,d,b=5(a,b){j c=a.O,d=b.O;o d>c?-1:c>d?1:0};G(a.2V(b),c="14",d=0;d"+c),c=2Q(c),c=c.2K()},6.2L=5(a){j f,b=n(a),c="2Z",d=c.p,e="";G(f=0;b>f;f++)e+=c.2U(F.1z(F.1Q()*d));o t.u(e),e},6.2N=5(a){j b,c,d,e;L(V==a||a.p<=0||1==2Y(a))o"";G(b=F.2W(a),b=b.13(),c=b.I(0,b.p-2),d=b.I(b.p-2,2),c=c.13(),d=d.13(),""==c&&(c="0"),10>a&&(d="0"+d),b=c+"."+d,e=/(-?\\d+)(\\d{3})/;e.C(b);)b=b.Y(e,"$1,$2");o b},6.2D=5(a){j b=n(a),e="",f=n(b/2C),g=n(b/2E-24*f),h=n(b/k-k*g-k*24*f),i=n(b-k*h-k*k*g-k*k*24*f);o f>0&&(e+=f+"天"),g>0&&(e+=g+"小时"),h>0&&(e+=h+"分"),i>0&&(e+=i+"秒"),e},6.2T=5(a){j e,b=n(a),c=0,d=0;o b>k&&(c=n(b/k),b=n(b%k),c>k&&(d=n(c/k),c=n(c%k))),e="",c>0&&(e=""+n(c)+"分"+e),d>0&&(e=""+n(d)+"小时"+e),e},11.1v.2X=5(a){j c,b={"M+":l.Q()+1,"d+":l.1A(),"h+":l.1u(),"m+":l.1x(),"s+":l.1y(),"q+":F.1z((l.Q()+3)/3),S:l.2i()};/(y+)/.C(a)&&(a=a.Y(z.$1,(l.1w()+"").I(4-z.$1.p)));G(c 2q b)H z("("+c+")").C(a)&&(a=a.Y(z.$1,1==z.$1.p?b[c]:("1S"+b[c]).I((""+b[c]).p)));o a},11.1v.1X=5(){j a=l.1y(),b=l.1x();o a>=0&&9>=a&&(a="0"+a),b>=0&&9>=b&&(b="0"+b),l.1w()+"/"+(l.Q()+1)+"/"+l.1A()+" "+l.1u()+":"+b+":"+a};',62,186,'|||||function|jsajax|||||||||||||var|60|this||parseInt|return|length||mUrl||console|log|JSON|document|stringify||RegExp||data|test|getApporWX|css|Math|for|new|substr|code|token|if||value|keyname|keyCode|getMonth|dynamicLoading||defaultReq||null|type||replace|||Date|openid|toString|14318527b13840c2a4af63fef52c2d6e|Z0|typeof|undefined|is|appID|qihuan|iosapp|setstyle|_app_id|shiftKey|navigator|indexOf|window|throw|Error|createElement|text|appendChild|head|getElementsByTagName|argument|path|required|wx|json|getHours|prototype|getFullYear|getMinutes|getSeconds|floor|getDate|9089|tcgettoken|9B7487C0CC6E|AFB0|gett|setApporWX|deviceInfo|BC0703A4|SetToken|4B51|SetPhone|rel|href|stylesheet|js|random|link|00|SetOpenid|phoneNum|andriodapp|addClass|toLocaleString|appId|OS|Mac|android|ios|onload||CPU|match|userAgent|isAndroidorios|appVersion|Android|Linux|onkeydown|event|ud8yq5tv0inxupc05xfeau39jywlqoj2|oncontextmenu|wx945eccc8163fd75b|getopenid|getMilliseconds|void|121|arguments|123|ctrlKey|73|tcgetopenid|in|contentType|application|charset|dataType|url|ajax|getsign|post|utf|isVehicleNumber|complete|86400|formatSeconds|3600|error|beforeSend|success|date|getTime|toUpperCase|salt|javascript|fenToYuan|strmd5|src|md5|script|setcss|fStohours|charAt|sort|round|format|isNaN|ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'.split('|'),0,{})) diff --git a/js/ajax_back.js b/js/ajax_back.js new file mode 100644 index 0000000..40a2cfa --- /dev/null +++ b/js/ajax_back.js @@ -0,0 +1,321 @@ + +window.onload = function () { + document.onkeydown = function () { + var e = window.event || arguments[0]; + //屏蔽F12 + if (e.keyCode == 123) { + + return false; + //屏蔽Ctrl+Shift+I + } else if ((e.ctrlKey) && (e.shiftKey) && (e.keyCode == 73)) { + + return false; + //屏蔽Shift+F10 + } else if ((e.shiftKey) && (e.keyCode == 121)) { + return false; + } + }; + //屏蔽右键单击 + document.oncontextmenu = function () { + return false; + } +} + +var _app_id = 'ud8yq5tv0inxupc05xfeau39jywlqoj2' +var jsajax = jsajax || {}; +//任你停赤峰 +jsajax.appID = 'wx945eccc8163fd75b'; +//获取openid +jsajax.getopenid = function (code,fn) { + var openid = ''; + var jsondata = { + appId:jsajax.appID, + code:code + }; + jsajax.defaultReq( + mUrl.tcgetopenid, + JSON.stringify(jsondata), + function(data){ + console.log("根据code获取openid"+JSON.stringify(data)); + if(data.code=='0'){ + openid = data.data; + mUrl.SetOpenid(openid); + mUrl.setApporWX('wx'); + console.log("用户 openid "+openid); + fn(openid); + } + } + ); +} +//获取token +jsajax.gett = function (openid,fn) { + var jsondata = { + openid:openid, + deviceInfo:"BC0703A4-AFB0-4B51-9089-9B7487C0CC6E" + } + jsajax.defaultReq( + mUrl.tcgettoken, + JSON.stringify(jsondata), + function (data) { + console.log('执行获取token的接口 '+JSON.stringify(data)); + if(data.code==0){ + console.log("用户 token "+data.data.token); + mUrl.SetToken(data.data.token); + mUrl.SetPhone(data.data.phoneNum); + fn(1); + }else{ + fn(0); + //location.href = mUrl.Uri+'/WEB-INF/pages/elsepages/common_pages/paybind.html; + } + } + ); +} +/*获取设备 start*/ + +jsajax.setstyle = function(){ + + var pt = ''; + if(mUrl.getApporWX()&&mUrl.getApporWX()!=''){ + pt = mUrl.getApporWX(); + } + // alert('clapntemp_获取到用户openid'+mUrl.getApporWX()); + + if(pt!=''){ + if(pt=='iosapp'||pt=='andriodapp'){ + if($('.qihuan')){ + $('.qihuan').addClass('iosapp'); + } + + } + } + console.log('执行米 '+pt); +} +jsajax.setstyle(); + + + +/*根据不同的类型加载不同的文件 start*/ +jsajax.dynamicLoading = { + css: function(path){ + if(!path || path.length === 0){ + throw new Error('argument "path" is required !'); + } + var head = document.getElementsByTagName('head')[0]; + var link = document.createElement('link'); + link.href = path; + link.rel = 'stylesheet'; + link.type = 'text/css'; + head.appendChild(link); + }, + js: function(path){ + if(!path || path.length === 0){ + throw new Error('argument "path" is required !'); + } + var head = document.getElementsByTagName('head')[0]; + var script = document.createElement('script'); + script.src = path; + script.type = 'text/javascript'; + head.appendChild(script); + } +} + +jsajax.setcss = function(strpath){ + var wxorapp = mUrl.getApporWX(); + console.log('这里先获取 '+wxorapp); + if(wxorapp){ + if(wxorapp!='wx'){ + console.log('不是微信微信'); + if(strpath){ + jsajax.dynamicLoading.css(strpath); + } + + }else{ + //jsajax.dynamicLoading.css("n1.css"); + //console.log('dengyu微信'); + } + }else{ + jsajax.dynamicLoading.css(strpath); + } +}; + +/* 默认请求*/ +jsajax.defaultReq=function(url, data, successfn,errorfn) { + data = (data==null || data=="" || typeof(data)=="undefined")? {"date": new Date().getTime()} : data; + $.ajax({ + type: "post", + data: data, + url: url, + dataType: "json", + contentType:'application/json;charset=utf-8', + beforeSend:function(xhr){}, + success: function(d){ + successfn(d); + }, + error: function(e){ + //alert(JSON.stringify(e)); + console.log(JSON.stringify(e)); + if (typeof (errorfn) != "undefined") { + errorfn(JSON.stringify(e)); + } + }, + complete:function (e) {} + }); +} +/* 车牌号校验.
*/ +jsajax.isVehicleNumber=function(vehicleNumber){ + var result = false; + if (vehicleNumber.length == 7){ + var express = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/; + result = express.test(vehicleNumber); + } + return result; +} + +//获取签名 +jsajax.getsign = function(objb){ + var compare = function (obj1, obj2) { + var val1 = obj1.keyname; + var val2 = obj2.keyname; + if (val1 < val2) { + return -1; + } else if (val1 > val2) { + return 1; + } else { + return 0; + } + } + objb.sort(compare); + var strmd5 = '14318527b13840c2a4af63fef52c2d6e'; + for(var i=0;i'+strmd5); + strmd5 = md5(strmd5); + strmd5=strmd5.toUpperCase(); + return strmd5; +} +//获取盐值 +jsajax.salt=function(a){ + var len = parseInt(a); + var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; + var maxPos = $chars.length; + var pwd = ''; + for (var i = 0; i < len; i++) { + pwd += $chars.charAt(Math.floor(Math.random() * maxPos)); + } + console.log(pwd); + return pwd; +} + +//金额转换(分转化成元) +jsajax.fenToYuan=function(fen){ + if( fen == null || fen.length<=0 || isNaN(fen) == true){ + return ""; + } + var yuan = Math.round(fen); + yuan = yuan.toString(); + var before = yuan.substr(0, yuan.length - 2); + + var end = yuan.substr(yuan.length - 2, 2); + before = before.toString(); + end = end.toString(); + if(before==''){ + before = '0'; + } + if(fen<10){ + end = '0'+end; + } + yuan = before + "." + end; + var re = /(-?\d+)(\d{3})/; + while (re.test(yuan)) { + yuan = yuan.replace(re, "$1,$2") + } + return yuan; +} +function isAndroidorios(fn){ + var u = navigator.userAgent, app = navigator.appVersion; + var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器 + var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 + isAndroid==true?true:false; + var jixing = ''; + if(isAndroid){jixing = 'android';}else if(isiOS){ + jixing = 'ios'; + } + fn(jixing); +} +//时间转化 秒转分 +jsajax.formatSeconds = function (value) { + var theTime = parseInt(value);// 秒 + var theTime1 = 0;// 分 + var theTime2 = 0;// 小时 + var result = ''; + var day = parseInt(theTime/(60*60*24)); + var hours = parseInt(theTime/(60*60) - day*24); + var fen = parseInt(theTime/60 -hours*60 - day*24*60); + var senc = parseInt(theTime -fen*60 -hours*60*60 - day*24*60*60); + if(day>0){result +=day+'天';} + if(hours>0){result +=hours+'小时';} + if(fen>0){result +=fen+'分';} + if(senc>0){result +=senc+'秒';} + return result; +} + +jsajax.fStohours = function (value) { + var theTime = parseInt(value);// 秒 + var theTime1 = 0;// 分 + var theTime2 = 0;// 小时 + if(theTime > 60) { + theTime1 = parseInt(theTime/60); + theTime = parseInt(theTime%60); + if(theTime1 > 60) { + theTime2 = parseInt(theTime1/60); + theTime1 = parseInt(theTime1%60); + } + } + var result = "";//+parseInt(theTime)+"秒"; + if(theTime1 > 0) { + result = ""+parseInt(theTime1)+"分"+result; + } + if(theTime2 > 0) { + result = ""+parseInt(theTime2)+"小时"+result; + } + return result; +} +//为Date类型拓展一个format方法,用于格式化日期 +Date.prototype.format = function (format) //author: meizz +{ + var o = { + "M+": this.getMonth() + 1, //month + "d+": this.getDate(), //day + "h+": this.getHours(), //hour + "m+": this.getMinutes(), //minute + "s+": this.getSeconds(), //second + "q+": Math.floor((this.getMonth() + 3) / 3), //quarter + "S": this.getMilliseconds() //millisecond + }; + if (/(y+)/.test(format)) + format = format.replace(RegExp.$1, + (this.getFullYear() + "").substr(4 - RegExp.$1.length)); + for (var k in o) + if (new RegExp("(" + k + ")").test(format)) + format = format.replace(RegExp.$1, + RegExp.$1.length == 1 ? o[k] : + ("00" + o[k]).substr(("" + o[k]).length)); + return format; +}; + +//时间格式的返回 +Date.prototype.toLocaleString = function() { + var se = this.getSeconds(); + var fz = this.getMinutes(); + if(se>=0&&se<=9){ + se = '0'+se; + } + if(fz>=0&&fz<=9){ + fz = '0'+fz; + } + return this.getFullYear() + "/" + (this.getMonth() + 1) + "/" + this.getDate() + " " + this.getHours() + ":" + fz + ":" + se; +}; diff --git a/js/config.js b/js/config.js index fd3635a..3f07dc6 100644 --- a/js/config.js +++ b/js/config.js @@ -7,11 +7,10 @@ window.webAppH5 = {}; /*服务器地址*/ -// -// http://pay.service.huangshiparking.com -// var webAppRoot = "http://pay.service.renniting.cn/v1"; + + var webAppRoot = "http://pay.service.renniting.cn/v1"; //test 测试环境 -var webAppRoot = "http://39.98.54.240:8090"; +// var webAppRoot = "http://39.98.54.240:8090"; //微信支付结果回调地址 var webAppPayResult = "http://wxgzh.renniting.cn/xcscan/PDA-Payment/wxpayResult.html"; @@ -56,54 +55,6 @@ webAppH5.zeroPayServer = "/appAccountPay/zeroPay"; - - - - -/*入场参数*/ -//测试地址 -//http://localhost:18879/page/in.html?plNo=P11011700C&parkingId=1&channelId=172198242&direction=0&codeType=0&expireDate=expireDate&extendData=extendData -//channelId=172198242 [入场设备号] -//webAppH5.appIn = { -// /*入场设备号*/ -// channelId: '172198242', -// /*入:0,1:出*/ -// direction: 0 -//} - -/*出场参数*/ -//测试地址 -//http://localhost:18879/page/out.html?plNo=P11011700C&parkingId=1&channelId=172198243&direction=1&codeType=0&expireDate=expireDate&extendData=extendData -//channelId=172198243 [出场设备号] -//direction=0 [通行方向 入:0,1:出 必填] -//webAppH5.appOut = { -// /*出场设备号*/ -// channelId: '172198243', -// /*入:0,1:出*/ -// direction:1 -//} - -//小票二维码出场 -//http://39.98.54.240/codepay/index.html?appid=0&lotId=1&payConfigId=2&receiptNo=3 -//http://localhost:1260/codepay/index.html?appid=0&lotId=1&payConfigId=2&receiptNo=3 - - -//首页 -//进出场标识>>>>>>>>>>direction=0 [通行方向 入:0,1:出 必填] -//测试服务器进场首页 -//http://39.98.54.240/codepay/index.html?plNo=P11011700C&parkingId=1&channelId=172198242&direction=0&codeType=0&expireDate=expireDate&extendData=extendData - -//测试服务器出场首页 -//http://39.98.54.240/codepay/index.html?plNo=P11011700C&parkingId=1&channelId=172198243&direction=1&codeType=0&expireDate=expireDate&extendData=extendData - - - -//测试支付[任你停测试-首页-停车记录(停车列表车牌号,再找到对应停车场编号)] -//http://test.renniting.cn/parking/admin/SubMenus/allparkrecords.html - -//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 - - function IsWeixinOrAlipay(){ // // var ua = window.navigator.userAgent; diff --git a/js/url.js b/js/url.js index 3d55b80..2faad24 100644 --- a/js/url.js +++ b/js/url.js @@ -87,14 +87,10 @@ mUrl.getJx = function(){ /*end*/ -var cepath = 'http://39.98.54.240:8090'; - -// var cepath = 'http://pay.service.renniting.cn/v1'; -// http://pay.service.renniting.cn -// var cepath = 'http://39.98.54.240:8090' -// http://app.api.dyszt.com:8090 -// var cepath = 'http://app.api.dyszt.com:8090'; -// https://pay.service.rnting.com//'http://47.96.41.38:8090'; +// var cepath = 'http://39.98.54.240:8090'; + +var cepath = 'http://pay.service.renniting.cn/v1'; + /*----------------------------------------------登录登出绑定手机号 start*/ //发送验证码 mUrl.sendRandCode = cepath + '/user/sendverificode';//webPath + '/binding/sendRandCode'+mUrl.getCommonParam(); diff --git a/list.html b/list.html index 78661fd..10b18d5 100644 --- a/list.html +++ b/list.html @@ -10,9 +10,7 @@ - - - + @@ -183,7 +181,7 @@ - +
@@ -205,15 +203,15 @@ -
-
-
车牌号码确认信息提示
-
请确认您当前缴费的车牌号码
-
-
是我的车,去支付
-
不是我的车,手动输入车牌号
-
-
+ + + + + + + + + @@ -224,26 +222,26 @@ - - + + - + diff --git a/list_bak.html b/list_bak.html new file mode 100644 index 0000000..5892c00 --- /dev/null +++ b/list_bak.html @@ -0,0 +1,249 @@ + + + + + 列表详情 + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
+
+
+
+

您已经成功申请离场

+

期待您的再次光临

+
+
温馨提示:请尽快出场,超过时间将重新计费哦!
+
+
+ +
+
+
车牌号码确认信息提示
+
请确认您当前缴费的车牌号码
+
+
是我的车,去支付
+
不是我的车,手动输入车牌号
+
+
+ + + + + + + + + + + + + + + + diff --git a/listnew.html b/listnew.html index d2f4a4e..b6c33c9 100644 --- a/listnew.html +++ b/listnew.html @@ -10,9 +10,7 @@ - - - +