From e3f87bb228f154f1f50b87a6d07f16a96b6964dc Mon Sep 17 00:00:00 2001 From: SilenceLeo Date: Fri, 5 Sep 2014 21:03:19 +0800 Subject: [PATCH] yes --- Mobile12306New/index.html | 2 +- Mobile12306New/js/init.js | 20 ++-- Mobile12306New/js/js.min.js | 138 ++++++++++++------------ Mobile12306New/js/login.js | 2 +- Mobile12306New/js/order_list.js | 2 +- Mobile12306New/js/prdersubmit.js | 2 +- Mobile12306New/js/query.js | 1 - Mobile12306New/js/remind.js | 3 +- Mobile12306New/js/run_query.js | 6 +- Mobile12306New/login.php | 174 +++++++++++++++++++++++++++++++ Mobile12306New/myremind.html | 5 + Mobile12306New/order_list.html | 5 +- Mobile12306New/remind.html | 5 + 13 files changed, 278 insertions(+), 87 deletions(-) create mode 100644 Mobile12306New/login.php diff --git a/Mobile12306New/index.html b/Mobile12306New/index.html index 8305dae..981917f 100644 --- a/Mobile12306New/index.html +++ b/Mobile12306New/index.html @@ -1,7 +1,7 @@ - + 车次查询 diff --git a/Mobile12306New/js/init.js b/Mobile12306New/js/init.js index 5bc792a..eab2da1 100644 --- a/Mobile12306New/js/init.js +++ b/Mobile12306New/js/init.js @@ -521,15 +521,20 @@ var bootStrap = (function() { var ajaxProxy = (function() { var ajax = function(method, url, returnType, postdata, refer, headers) { var ad = new $.Deferred(); - headers = headers || {}; + var headers = headers || {}; + returnType = returnType || 'json'; + // headers = headers || {}; if (refer) { headers = $.extend({}, headers, { Referer: refer }); } - headers["Fish-RawUrl"] = url; + var header={}; + for (var k in headers) { + header["FISHPROXY-"+k] = headers[k]; + }; + header["FISHPROXY-RawUrl"] = url; url = "/12306/proxy.php"; - $.ajax({ url: url, data: postdata, @@ -537,16 +542,15 @@ var bootStrap = (function() { type: method, dataType: returnType, refer: refer, - headers: headers - }).done(function(result, xhr) { - console.log(result, xhr) + headers: header + }).done(function(result, status, xhr) { ad.resolve(result, { headers: xhr.getAllResponseHeaders(), statusCode: xhr.statusCode, statusDescription: xhr.statusText, id: 0 }); - }).fail(function() { + }).fail(function(xhr) { ad.reject(xhr.responseText, { headers: xhr.getAllResponseHeaders(), statusCode: xhr.statusCode, @@ -570,7 +574,7 @@ var bootStrap = (function() { xhr.open(method, url, true); $.each(headers, function(k, v) { - xhr.setRequestHeader("Fish-" + k, v); + xhr.setRequestHeader("FISHPROXY-" + k, v); }); xhr.onreadystatechange = function() { if (xhr.readyState === 4) { diff --git a/Mobile12306New/js/js.min.js b/Mobile12306New/js/js.min.js index dd63812..9796c1d 100644 --- a/Mobile12306New/js/js.min.js +++ b/Mobile12306New/js/js.min.js @@ -1,41 +1,41 @@ var Zepto=function(){function a(a){return null==a?String(a):L[R.call(a)]||"object"}function b(b){return"function"==a(b)}function c(a){return null!=a&&a==a.window}function d(a){return null!=a&&a.nodeType==a.DOCUMENT_NODE}function e(b){return"object"==a(b)}function f(a){return e(a)&&!c(a)&&Object.getPrototypeOf(a)==Object.prototype}function g(a){return"number"==typeof a.length}function m(a){return z.call(a,function(a){return null!=a})}function l(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g, -"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function p(a){return a in E?E[a]:E[a]=RegExp("(^|\\s)"+a+"(\\s|$)")}function A(a){return"children"in a?x.call(a.children):h.map(a.childNodes,function(a){if(1==a.nodeType)return a})}function k(a,b,c){for(v in b)c&&(f(b[v])||H(b[v]))?(f(b[v])&&!f(a[v])&&(a[v]={}),H(b[v])&&!H(a[v])&&(a[v]=[]),k(a[v],b[v],c)):b[v]!==w&&(a[v]=b[v])}function y(a,b){return null==b?h(a):h(a).filter(b)}function n(a,c,d,e){return b(c)?c.call(a,d, -e):c}function s(a,b){var c=a.className||"",d=c&&c.baseVal!==w;if(b===w)return d?c.baseVal:c;d?c.baseVal=b:a.className=b}function q(a){var b;try{return a?"true"==a||("false"==a?!1:"null"==a?null:!/^0/.test(a)&&!isNaN(b=Number(a))?b:/^[\[\{]/.test(a)?h.parseJSON(a):a):a}catch(c){return a}}function B(a,b){b(a);for(var c=0,d=a.childNodes.length;c]*>/,S=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,T=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,N=/^(?:body|html)$/i,U=/([A-Z])/g,V="val css html text data width height offset".split(" "),M=r.createElement("table"),O=r.createElement("tr"),P={tr:r.createElement("tbody"),tbody:M,thead:M,tfoot:M,td:O,th:O,"*":r.createElement("div")},W=/complete|loaded|interactive/,X=/^[\w-]*$/,L={},R=L.toString,C={},J,K,Q=r.createElement("div"),Y={tabindex:"tabIndex", readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},H=Array.isArray||function(a){return a instanceof Array};C.matches=function(a,b){if(!b||!a||1!==a.nodeType)return!1;var c=a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.matchesSelector;if(c)return c.call(a,b);var d;d=a.parentNode;(c=!d)&& -(d=Q).appendChild(a);d=~C.qsa(d,b).indexOf(a);c&&Q.removeChild(a);return d};J=function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})};K=function(a){return z.call(a,function(b,c){return a.indexOf(b)==c})};C.fragment=function(a,b,c){var d,e,g;S.test(a)&&(d=h(r.createElement(RegExp.$1)));d||(a.replace&&(a=a.replace(T,"<$1>")),b===w&&(b=I.test(a)&&RegExp.$1),b in P||(b="*"),g=P[b],g.innerHTML=""+a,d=h.each(x.call(g.childNodes),function(){g.removeChild(this)}));f(c)&&(e= -h(d),h.each(c,function(a,b){if(-1")),b===s&&(b=I.test(a)&&RegExp.$1),b in P||(b="*"),g=P[b],g.innerHTML=""+a,d=h.each(x.call(g.childNodes),function(){g.removeChild(this)}));f(c)&&(e= +h(d),h.each(c,function(a,b){if(-1d.indexOf(a)&&c.push(a)})}return h(c)},has:function(a){return this.filter(function(){return e(a)?h.contains(this,a):h(this).find(a).size()})},eq:function(a){return-1===a?this.slice(a):this.slice(a,+a+1)},first:function(){var a=this[0];return a&&!e(a)?a:h(a)},last:function(){var a=this[this.length-1];return a&&!e(a)?a:h(a)},find:function(a){var b=this;return a?"object"==typeof a?h(a).filter(function(){var a=this;return u.some.call(b,function(b){return h.contains(b, +h.fn={forEach:v.forEach,reduce:v.reduce,push:v.push,sort:v.sort,indexOf:v.indexOf,concat:v.concat,map:function(a){return h(h.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return h(x.apply(this,arguments))},ready:function(a){W.test(r.readyState)&&r.body?a(h):r.addEventListener("DOMContentLoaded",function(){a(h)},!1);return this},get:function(a){return a===s?x.call(this):this[0<=a?a:a+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!= +this.parentNode&&this.parentNode.removeChild(this)})},each:function(a){v.every.call(this,function(b,c){return!1!==a.call(b,c,b)});return this},filter:function(a){return b(a)?this.not(this.not(a)):h(z.call(this,function(b){return C.matches(b,a)}))},add:function(a,b){return h(K(this.concat(h(a,b))))},is:function(a){return 0d.indexOf(a)&&c.push(a)})}return h(c)},has:function(a){return this.filter(function(){return e(a)?h.contains(this,a):h(this).find(a).size()})},eq:function(a){return-1===a?this.slice(a):this.slice(a,+a+1)},first:function(){var a=this[0];return a&&!e(a)?a:h(a)},last:function(){var a=this[this.length-1];return a&&!e(a)?a:h(a)},find:function(a){var b=this;return a?"object"==typeof a?h(a).filter(function(){var a=this;return v.some.call(b,function(b){return h.contains(b, a)})}):1==this.length?h(C.qsa(this[0],a)):this.map(function(){return C.qsa(this,a)}):[]},closest:function(a,b){var c=this[0],e=!1;for("object"==typeof a&&(e=h(a));c&&!(e?0<=e.indexOf(c):C.matches(c,a));)c=c!==b&&!d(c)&&c.parentNode;return h(c)},parents:function(a){for(var b=[],c=this;0b.indexOf(a))return b.push(a),a});return y(b,a)},parent:function(a){return y(K(this.pluck("parentNode")),a)},children:function(a){return y(this.map(function(){return A(this)}), a)},contents:function(){return this.map(function(){return x.call(this.childNodes)})},siblings:function(a){return y(this.map(function(a,b){return z.call(A(b.parentNode),function(a){return a!==b})}),a)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(a){return h.map(this,function(b){return b[a]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display="");if("none"==getComputedStyle(this,"").getPropertyValue("display")){var a=this.style, b=this.nodeName,c,d;F[b]||(c=r.createElement(b),r.body.appendChild(c),d=getComputedStyle(c,"").getPropertyValue("display"),c.parentNode.removeChild(c),"none"==d&&(d="block"),F[b]=d);a.display=F[b]}})},replaceWith:function(a){return this.before(a).remove()},wrap:function(a){var c=b(a);if(this[0]&&!c)var d=h(a).get(0),e=d.parentNode||1arguments.length){var d=this[0],e=getComputedStyle(d,"");if(!d)return;if("string"==typeof b)return d.style[J(b)]||e.getPropertyValue(b); -if(H(b)){var f={};h.each(b,function(a,b){f[b]=d.style[J(b)]||e.getPropertyValue(b)});return f}}var r="";if("string"==a(b))!c&&0!==c?this.each(function(){this.style.removeProperty(l(b))}):r=l(b)+":"+("number"==typeof c&&!G[l(b)]?c+"px":c);else for(v in b)!b[v]&&0!==b[v]?this.each(function(){this.style.removeProperty(l(v))}):r+=l(v)+":"+("number"==typeof b[v]&&!G[l(v)]?b[v]+"px":b[v])+";";return this.each(function(){this.style.cssText+=";"+r})},index:function(a){return a?this.indexOf(h(a)[0]):this.parent().children().indexOf(this[0])}, -hasClass:function(a){return!a?!1:u.some.call(this,function(a){return this.test(s(a))},p(a))},addClass:function(a){return!a?this:this.each(function(b){if("className"in this){D=[];var c=s(this);n(this,a,b,c).split(/\s+/g).forEach(function(a){h(this).hasClass(a)||D.push(a)},this);D.length&&s(this,c+(c?" ":"")+D.join(" "))}})},removeClass:function(a){return this.each(function(b){if("className"in this){if(a===w)return s(this,"");D=s(this);n(this,a,b,D).split(/\s+/g).forEach(function(a){D=D.replace(p(a), -" ")});s(this,D.trim())}})},toggleClass:function(a,b){return!a?this:this.each(function(c){var d=h(this);n(this,a,c,s(this)).split(/\s+/g).forEach(function(a){(b===w?!d.hasClass(a):b)?d.addClass(a):d.removeClass(a)})})},scrollTop:function(a){if(this.length){var b="scrollTop"in this[0];return a===w?b?this[0].scrollTop:this[0].pageYOffset:this.each(b?function(){this.scrollTop=a}:function(){this.scrollTo(this.scrollX,a)})}},scrollLeft:function(a){if(this.length){var b="scrollLeft"in this[0];return a=== -w?b?this[0].scrollLeft:this[0].pageXOffset:this.each(b?function(){this.scrollLeft=a}:function(){this.scrollTo(a,this.scrollY)})}},position:function(){if(this.length){var a=this[0],b=this.offsetParent(),c=this.offset(),d=N.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(h(a).css("margin-top"))||0;c.left-=parseFloat(h(a).css("margin-left"))||0;d.top+=parseFloat(h(b[0]).css("border-top-width"))||0;d.left+=parseFloat(h(b[0]).css("border-left-width"))||0;return{top:c.top-d.top,left:c.left- -d.left}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||r.body;a&&!N.test(a.nodeName)&&"static"==h(a).css("position");)a=a.offsetParent;return a})}};h.fn.detach=h.fn.remove;["width","height"].forEach(function(a){var b=a.replace(/./,function(a){return a[0].toUpperCase()});h.fn[a]=function(e){var f,r=this[0];return e===w?c(r)?r["inner"+b]:d(r)?r.documentElement["scroll"+b]:(f=this.offset())&&f[a]:this.each(function(b){r=h(this);r.css(a,n(this,e,b,r[a]()))})}});["after", +if(H(b)){var f={};h.each(b,function(a,b){f[b]=d.style[J(b)]||e.getPropertyValue(b)});return f}}var r="";if("string"==a(b))!c&&0!==c?this.each(function(){this.style.removeProperty(l(b))}):r=l(b)+":"+("number"==typeof c&&!G[l(b)]?c+"px":c);else for(w in b)!b[w]&&0!==b[w]?this.each(function(){this.style.removeProperty(l(w))}):r+=l(w)+":"+("number"==typeof b[w]&&!G[l(w)]?b[w]+"px":b[w])+";";return this.each(function(){this.style.cssText+=";"+r})},index:function(a){return a?this.indexOf(h(a)[0]):this.parent().children().indexOf(this[0])}, +hasClass:function(a){return!a?!1:v.some.call(this,function(a){return this.test(u(a))},p(a))},addClass:function(a){return!a?this:this.each(function(b){if("className"in this){D=[];var c=u(this);n(this,a,b,c).split(/\s+/g).forEach(function(a){h(this).hasClass(a)||D.push(a)},this);D.length&&u(this,c+(c?" ":"")+D.join(" "))}})},removeClass:function(a){return this.each(function(b){if("className"in this){if(a===s)return u(this,"");D=u(this);n(this,a,b,D).split(/\s+/g).forEach(function(a){D=D.replace(p(a), +" ")});u(this,D.trim())}})},toggleClass:function(a,b){return!a?this:this.each(function(c){var d=h(this);n(this,a,c,u(this)).split(/\s+/g).forEach(function(a){(b===s?!d.hasClass(a):b)?d.addClass(a):d.removeClass(a)})})},scrollTop:function(a){if(this.length){var b="scrollTop"in this[0];return a===s?b?this[0].scrollTop:this[0].pageYOffset:this.each(b?function(){this.scrollTop=a}:function(){this.scrollTo(this.scrollX,a)})}},scrollLeft:function(a){if(this.length){var b="scrollLeft"in this[0];return a=== +s?b?this[0].scrollLeft:this[0].pageXOffset:this.each(b?function(){this.scrollLeft=a}:function(){this.scrollTo(a,this.scrollY)})}},position:function(){if(this.length){var a=this[0],b=this.offsetParent(),c=this.offset(),d=N.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(h(a).css("margin-top"))||0;c.left-=parseFloat(h(a).css("margin-left"))||0;d.top+=parseFloat(h(b[0]).css("border-top-width"))||0;d.left+=parseFloat(h(b[0]).css("border-left-width"))||0;return{top:c.top-d.top,left:c.left- +d.left}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||r.body;a&&!N.test(a.nodeName)&&"static"==h(a).css("position");)a=a.offsetParent;return a})}};h.fn.detach=h.fn.remove;["width","height"].forEach(function(a){var b=a.replace(/./,function(a){return a[0].toUpperCase()});h.fn[a]=function(e){var f,r=this[0];return e===s?c(r)?r["inner"+b]:d(r)?r.documentElement["scroll"+b]:(f=this.offset())&&f[a]:this.each(function(b){r=h(this);r.css(a,n(this,e,b,r[a]()))})}});["after", "prepend","before","append"].forEach(function(b,c){var d=c%2;h.fn[b]=function(){var b,e=h.map(arguments,function(c){b=a(c);return"object"==b||"array"==b||null==c?c:C.fragment(c)}),f,g=1e.length?this:this.each(function(a,b){f=d?b:b.parentNode;b=0==c?b.nextSibling:1==c?b.firstChild:2==c?b:null;var F=h.contains(r.documentElement,f);e.forEach(function(a){if(g)a=a.cloneNode(!0);else if(!f)return h(a).remove();f.insertBefore(a,b);F&&B(a,function(a){null!=a.nodeName&&("SCRIPT"===a.nodeName.toUpperCase()&& (!a.type||"text/javascript"===a.type)&&!a.src)&&window.eval.call(window,a.innerHTML)})})})};h.fn[d?b+"To":"insert"+(c?"Before":"After")]=function(a){h(a)[b](this);return this}});C.Z.prototype=h.fn;C.uniq=K;C.deserializeValue=q;h.zepto=C;return h}();window.Zepto=Zepto;void 0===window.$&&(window.$=Zepto); -(function(a){function b(b,c,d,e){if(b.global)return b=c||s,d=a.Event(d),a(b).trigger(d,e),!d.isDefaultPrevented()}function c(c){c.global&&0===a.active++&&b(c,null,"ajaxStart")}function d(a,c){var d=c.context;if(!1===c.beforeSend.call(d,a,c)||!1===b(c,d,"ajaxBeforeSend",[a,c]))return!1;b(c,d,"ajaxSend",[a,c])}function e(a,c,d,e){var f=d.context;d.success.call(f,a,"success",c);e&&e.resolveWith(f,[a,"success",c]);b(d,f,"ajaxSuccess",[c,d,a]);g("success",c,d)}function f(a,c,d,e,f){var h=e.context;e.error.call(h, -d,c,a);f&&f.rejectWith(h,[d,c,a]);b(e,h,"ajaxError",[d,e,a||c]);g(c,d,e)}function g(c,d,e){var f=e.context;e.complete.call(f,d,c);b(e,f,"ajaxComplete",[d,e]);e.global&&!--a.active&&b(e,null,"ajaxStop")}function m(){}function l(a){a&&(a=a.split(";",2)[0]);return a&&(a==u?"html":a==D?"json":v.test(a)?"script":h.test(a)&&"xml")||"text"}function p(a,b){return""==b?a:(a+"&"+b).replace(/[&?]{1,2}/,"?")}function A(b){b.processData&&(b.data&&"string"!=a.type(b.data))&&(b.data=a.param(b.data,b.traditional)); -if(b.data&&(!b.type||"GET"==b.type.toUpperCase()))b.url=p(b.url,b.data),b.data=void 0}function k(b,c,d,e){a.isFunction(c)&&(e=d,d=c,c=void 0);a.isFunction(d)||(e=d,d=void 0);return{url:b,data:c,success:d,dataType:e}}function y(b,c,d,e){var f,g=a.isArray(c),h=a.isPlainObject(c);a.each(c,function(c,n){f=a.type(n);e&&(c=d?e:e+"["+(h||"object"==f||"array"==f?c:"")+"]");!e&&g?b.add(n.name,n.value):"array"==f||!d&&"object"==f?y(b,n,d,c):b.add(c,n)})}var n=0,s=window.document,q,B,w=/)<[^<]*)*<\/script>/gi, -v=/^(?:text|application)\/javascript/i,h=/^(?:text|application)\/xml/i,D="application/json",u="text/html",x=/^\s*$/;a.active=0;a.ajaxJSONP=function(b,c){if(!("type"in b))return a.ajax(b);var g=b.jsonpCallback,h=(a.isFunction(g)?g():g)||"jsonp"+ ++n,x=s.createElement("script"),p=window[h],q,z=function(b){a(x).triggerHandler("error",b||"abort")},l={abort:z},m;c&&c.promise(l);a(x).on("load error",function(d,g){clearTimeout(m);a(x).off().remove();"error"==d.type||!q?f(null,g||"error",l,b,c):e(q[0],l, -b,c);window[h]=p;q&&a.isFunction(p)&&p(q[0]);p=q=void 0});if(!1===d(l,b))return z("abort"),l;window[h]=function(){q=arguments};x.src=b.url.replace(/\?(.+)=\?/,"?$1="+h);s.head.appendChild(x);0k.status||304==k.status||0==k.status&&"file:"==w){n=n||l(g.mimeType||k.getResponseHeader("content-type"));b=k.responseText;try{"script"==n?(0,eval)(b):"xml"==n?b=k.responseXML:"json"==n&& -(b=x.test(b)?null:a.parseJSON(b))}catch(d){c=d}c?f(c,"parsererror",k,g,h):e(b,k,g,h)}else f(k.statusText||null,k.status?"error":"abort",k,g,h)}};if(!1===d(k,g))return k.abort(),f(null,"abort",k,g,h),k;if(g.xhrFields)for(B in g.xhrFields)k[B]=g.xhrFields[B];k.open(g.type,g.url,"async"in g?g.async:!0,g.username,g.password);for(B in s)y.apply(k,s[B]);0").html(b.replace(w,"")).find(g):b);h&&h.apply(e,arguments)};a.ajax(b);return this};var z=encodeURIComponent; +(function(a){function b(b,c,d,e){if(b.global)return b=c||u,d=a.Event(d),a(b).trigger(d,e),!d.isDefaultPrevented()}function c(c){c.global&&0===a.active++&&b(c,null,"ajaxStart")}function d(a,c){var d=c.context;if(!1===c.beforeSend.call(d,a,c)||!1===b(c,d,"ajaxBeforeSend",[a,c]))return!1;b(c,d,"ajaxSend",[a,c])}function e(a,c,d,e){var f=d.context;d.success.call(f,a,"success",c);e&&e.resolveWith(f,[a,"success",c]);b(d,f,"ajaxSuccess",[c,d,a]);g("success",c,d)}function f(a,c,d,e,f){var h=e.context;e.error.call(h, +d,c,a);f&&f.rejectWith(h,[d,c,a]);b(e,h,"ajaxError",[d,e,a||c]);g(c,d,e)}function g(c,d,e){var f=e.context;e.complete.call(f,d,c);b(e,f,"ajaxComplete",[d,e]);e.global&&!--a.active&&b(e,null,"ajaxStop")}function m(){}function l(a){a&&(a=a.split(";",2)[0]);return a&&(a==v?"html":a==D?"json":w.test(a)?"script":h.test(a)&&"xml")||"text"}function p(a,b){return""==b?a:(a+"&"+b).replace(/[&?]{1,2}/,"?")}function A(b){b.processData&&(b.data&&"string"!=a.type(b.data))&&(b.data=a.param(b.data,b.traditional)); +if(b.data&&(!b.type||"GET"==b.type.toUpperCase()))b.url=p(b.url,b.data),b.data=void 0}function k(b,c,d,e){a.isFunction(c)&&(e=d,d=c,c=void 0);a.isFunction(d)||(e=d,d=void 0);return{url:b,data:c,success:d,dataType:e}}function y(b,c,d,e){var f,g=a.isArray(c),h=a.isPlainObject(c);a.each(c,function(c,n){f=a.type(n);e&&(c=d?e:e+"["+(h||"object"==f||"array"==f?c:"")+"]");!e&&g?b.add(n.name,n.value):"array"==f||!d&&"object"==f?y(b,n,d,c):b.add(c,n)})}var n=0,u=window.document,q,B,s=/)<[^<]*)*<\/script>/gi, +w=/^(?:text|application)\/javascript/i,h=/^(?:text|application)\/xml/i,D="application/json",v="text/html",x=/^\s*$/;a.active=0;a.ajaxJSONP=function(b,c){if(!("type"in b))return a.ajax(b);var g=b.jsonpCallback,h=(a.isFunction(g)?g():g)||"jsonp"+ ++n,x=u.createElement("script"),p=window[h],q,z=function(b){a(x).triggerHandler("error",b||"abort")},l={abort:z},s;c&&c.promise(l);a(x).on("load error",function(d,g){clearTimeout(s);a(x).off().remove();"error"==d.type||!q?f(null,g||"error",l,b,c):e(q[0],l, +b,c);window[h]=p;q&&a.isFunction(p)&&p(q[0]);p=q=void 0});if(!1===d(l,b))return z("abort"),l;window[h]=function(){q=arguments};x.src=b.url.replace(/\?(.+)=\?/,"?$1="+h);u.head.appendChild(x);0k.status||304==k.status||0==k.status&&"file:"==s){n=n||l(g.mimeType||k.getResponseHeader("content-type"));b=k.responseText;try{"script"==n?(0,eval)(b):"xml"==n?b=k.responseXML:"json"==n&& +(b=x.test(b)?null:a.parseJSON(b))}catch(d){c=d}c?f(c,"parsererror",k,g,h):e(b,k,g,h)}else f(k.statusText||null,k.status?"error":"abort",k,g,h)}};if(!1===d(k,g))return k.abort(),f(null,"abort",k,g,h),k;if(g.xhrFields)for(B in g.xhrFields)k[B]=g.xhrFields[B];k.open(g.type,g.url,"async"in g?g.async:!0,g.username,g.password);for(B in u)y.apply(k,u[B]);0").html(b.replace(s,"")).find(g):b);h&&h.apply(e,arguments)};a.ajax(b);return this};var z=encodeURIComponent; a.param=function(a,b){var c=[];c.add=function(a,b){this.push(z(a)+"="+z(b))};y(c,a,b);return c.join("&").replace(/%20/g,"+")}})(Zepto);(function(a){var b=[],c;a.fn.remove=function(){return this.each(function(){this.parentNode&&("IMG"===this.tagName&&(b.push(this),this.src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",c&&clearTimeout(c),c=setTimeout(function(){b=[]},6E4)),this.parentNode.removeChild(this))})}})(Zepto); (function(a){a.Callbacks=function(b){b=a.extend({},b);var c,d,e,f,g,m,l=[],p=!b.once&&[],A=function(a){c=b.memory&&a;d=!0;m=f||0;f=0;g=l.length;for(e=!0;l&&m=d&&setTimeout(function(){F.each(function(){E.call(this)})},0);return this};e=null})(Zepto); (function(a,b){function c(c,d,e,f,g){"function"==typeof d&&!g&&(g=d,d=b);e={opacity:e};f&&(e.scale=f,c.css(a.fx.cssPrefix+"transform-origin","0 0"));return c.animate(e,d,null,g)}function d(b,d,e,g){return c(b,d,0,e,function(){f.call(a(this));g&&g.call(this)})}var e=a.fn.show,f=a.fn.hide,g=a.fn.toggle;a.fn.show=function(a,d){e.call(this);a===b?a=0:this.css("opacity",0);return c(this,a,1,"1,1",d)};a.fn.hide=function(a,c){return a===b?f.call(this):d(this,a,"0,0",c)};a.fn.toggle=function(c,d){return c=== b||"boolean"==typeof c?g.call(this,c):this.each(function(){var b=a(this);b["none"==b.css("display")?"show":"hide"](c,d)})};a.fn.fadeTo=function(a,b,d){return c(this,a,b,null,d)};a.fn.fadeIn=function(a,b){var c=this.css("opacity");0>>0,e=0,f;if("function"!=typeof b)throw new TypeError;if(0==d&&1==arguments.length)throw new TypeError;if(2<=arguments.length)f=arguments[1];else{do{if(e in c){f=c[e++];break}if(++e>=d)throw new TypeError;}while(1)}for(;e/,p="Zepto"+ +new Date;d.qsa=function(b,f){return c(f,function(c,g,s){try{var q;!c&&g?c="*":l.test(c)&&(q=a(b).addClass(p),c="."+p+" "+c);var m=e(b,c)}catch(w){throw console.error("error performing selector: %o", -f),w;}finally{q&&q.removeClass(p)}return!g?m:d.uniq(a.map(m,function(a,b){return g.call(a,b,m,s)}))})};d.matches=function(a,b){return c(b,function(b,c,d){return(!b||f(a,b))&&(!c||c.call(a,null,d)===a)})}})(Zepto); +first:function(a){if(0===a)return this},last:function(a,b){if(a===b.length-1)return this},eq:function(a,b,c){if(a===c)return this},contains:function(b,c,d){if(-1/,p="Zepto"+ +new Date;d.qsa=function(b,f){return c(f,function(c,g,u){try{var q;!c&&g?c="*":l.test(c)&&(q=a(b).addClass(p),c="."+p+" "+c);var m=e(b,c)}catch(s){throw console.error("error performing selector: %o", +f),s;}finally{q&&q.removeClass(p)}return!g?m:d.uniq(a.map(m,function(a,b){return g.call(a,b,m,u)}))})};d.matches=function(a,b){return c(b,function(b,c,d){return(!b||f(a,b))&&(!c||c.call(a,null,d)===a)})}})(Zepto); (function(a){a.fn.end=function(){return this.prevObject||a()};a.fn.andSelf=function(){return this.add(this.prevObject||a())};"filter add not eq first last find closest parents parent children siblings".split(" ").forEach(function(b){var c=a.fn[b];a.fn[b]=function(){var a=c.apply(this,arguments);a.prevObject=this;return a}})})(Zepto); (function(a){function b(){p=null;f.last&&(f.el.trigger("longTap"),f={})}function c(){g&&clearTimeout(g);m&&clearTimeout(m);l&&clearTimeout(l);p&&clearTimeout(p);g=m=l=p=null;f={}}function d(a){return("touch"==a.pointerType||a.pointerType==a.MSPOINTER_TYPE_TOUCH)&&a.isPrimary}function e(a,b){return a.type=="pointer"+b||a.type.toLowerCase()=="mspointer"+b}var f={},g,m,l,p,A;(function(){Math.random=function(a){return function(){if(!window.v)return a.apply(this);var b=window.v;delete window.v;for(var c= -0,d=0;da.velocityX?"Left":1a.velocityY?"Up":null)f.el.trigger("swipe"), +0,d=0;da.velocityX?"Left":1a.velocityY?"Up":null)f.el.trigger("swipe"), f.el.trigger("swipe"+a)}).on("touchstart MSPointerDown pointerdown",function(c){if(!(B=e(c,"down"))||d(c))q=B?c:c.touches[0],c.touches&&(1===c.touches.length&&f.x2)&&(f.x2=void 0,f.y2=void 0),k=Date.now(),y=k-(f.last||k),f.el=a("tagName"in q.target?q.target:q.target.parentNode),g&&clearTimeout(g),f.x1=q.pageX,f.y1=q.pageY,0=y&&(f.isDoubleTap=!0),f.last=k,p=setTimeout(b,750),A&&B&&A.addPointer(c.pointerId)}).on("touchmove MSPointerMove pointermove",function(a){if(!(B=e(a,"move"))||d(a))q=B? -a:a.touches[0],p&&clearTimeout(p),p=null,f.x2=q.pageX,f.y2=q.pageY,n+=Math.abs(f.x1-f.x2),s+=Math.abs(f.y1-f.y2)}).on("touchend MSPointerUp pointerup",function(b){if(!(B=e(b,"up"))||d(b))p&&clearTimeout(p),p=null,f.x2&&30=Math.abs(f.y1-f.y2)?0n&&30>s?m=setTimeout(function(){var b=a.Event("tap"); -b.cancelTouch=c;f.el.trigger(b);f.isDoubleTap?(f.el&&f.el.trigger("doubleTap"),f={}):g=setTimeout(function(){g=null;f.el&&f.el.trigger("singleTap");f={}},250)},0):f={}),n=s=0}).on("touchcancel MSPointerCancel pointercancel",c);a(window).on("scroll",c)});"swipe swipeLeft swipeRight swipeUp swipeDown doubleTap tap singleTap longTap".split(" ").forEach(function(b){a.fn[b]=function(a){return this.on(b,a)}})})(Zepto);var Client={deviceInfo:null,init:function(){Client.getDeviceInfo()},getDeviceInfo:function(){try{Client.deviceInfo=bootStrap.device_info,Client.deviceInfo="string"==typeof Client.deviceInfo?JSON.parse(Client.deviceInfo):Client.deviceInfo}catch(a){alert(a)}},openUrl:function(a){a&&bootStrap.open_url(a)},refreshStart:function(){try{bootStrap.refresh_start()}catch(a){alert(a)}},refreshEnd:function(){try{bootStrap.refresh_end()}catch(a){alert(a)}},successTime:null,refreshSuccess:function(){try{bootStrap.refresh_success()}catch(a){alert(a)}}};var WIN=window,DOC=document,SKIPVC=!0,hostApi="12306.cn/otsweb",baseProxyUrl="/12306/proxy.php",isMobile=!0,isIos="undefined"!=typeof window.__gChrome||"undefined"!=typeof liebaoExtentions&&liebaoExtentions.isWebviewLiebao&&liebaoExtentions.isWebviewLiebao(),isAndLiebao="undefined"!=typeof liebaoExtentions,isWebApp=!1;DOC.addEventListener("mobileSupportInitialized",function(){isWebApp=!0}); +a:a.touches[0],p&&clearTimeout(p),p=null,f.x2=q.pageX,f.y2=q.pageY,n+=Math.abs(f.x1-f.x2),u+=Math.abs(f.y1-f.y2)}).on("touchend MSPointerUp pointerup",function(b){if(!(B=e(b,"up"))||d(b))p&&clearTimeout(p),p=null,f.x2&&30=Math.abs(f.y1-f.y2)?0n&&30>u?m=setTimeout(function(){var b=a.Event("tap"); +b.cancelTouch=c;f.el.trigger(b);f.isDoubleTap?(f.el&&f.el.trigger("doubleTap"),f={}):g=setTimeout(function(){g=null;f.el&&f.el.trigger("singleTap");f={}},250)},0):f={}),n=u=0}).on("touchcancel MSPointerCancel pointercancel",c);a(window).on("scroll",c)});"swipe swipeLeft swipeRight swipeUp swipeDown doubleTap tap singleTap longTap".split(" ").forEach(function(b){a.fn[b]=function(a){return this.on(b,a)}})})(Zepto);var Client={deviceInfo:null,init:function(){Client.getDeviceInfo()},getDeviceInfo:function(){try{Client.deviceInfo=bootStrap.device_info,Client.deviceInfo="string"==typeof Client.deviceInfo?JSON.parse(Client.deviceInfo):Client.deviceInfo}catch(a){alert(a)}},openUrl:function(a){a&&bootStrap.open_url(a)},refreshStart:function(){try{bootStrap.refresh_start()}catch(a){alert(a)}},refreshEnd:function(){try{bootStrap.refresh_end()}catch(a){alert(a)}},successTime:null,refreshSuccess:function(){try{bootStrap.refresh_success()}catch(a){alert(a)}}};var WIN=window,DOC=document,SKIPVC=!0,hostApi="12306.cn/otsweb",baseProxyUrl="/12306/proxy.php",isMobile=!0,isIos="undefined"!=typeof window.__gChrome||"undefined"!=typeof liebaoExtentions&&liebaoExtentions.isWebviewLiebao&&liebaoExtentions.isWebviewLiebao(),isAndLiebao="undefined"!=typeof liebaoExtentions,isWebApp=!1;DOC.addEventListener("mobileSupportInitialized",function(){isWebApp=!0}); var Public={init:function(){window.onbeforeunload=function(){Client.refreshEnd()};window.onunload=function(){Client.refreshEnd()};Public.setHis();cn12306.getLocalTrainNos();$("#randcodeimg").on("click",function(a){cn12306.recode();return!1});$(".query_box .query_bigcheck").live("click",function(){$(".query_bigcheck",$(this).parent(".query_box")).removeClass("query_bigcheck_checked");$("input[type=radio]",this).attr("checked","checked");$(this).addClass("query_bigcheck_checked")});$('[data-fn="back"]').on("click", function(){window.history.back()});$(".query_box [type=checkbox]").on("change",function(a){if(0!=$(this).closest(".query_box").find('[type=checkbox][value="all"]').length){a=$(this).closest(".query_box").find("[type=checkbox]");var b=$(this).closest(".query_box").find('[type=checkbox][value="all"]');if("all"==$(this).val())$(this).prop("checked")?a.prop("checked",!0):a.prop("checked",!1);else{var c=$(this).closest(".query_box").find("[type=checkbox]:checked").length;b.prop("checked")&&c--;c==a.length- 1?b.prop("checked",!0):b.prop("checked",!1)}}});$(".loginout").live("click",function(){var a=$(this).attr("data-url");Public.isLogin?Public.confirm("\u786e\u5b9a\u9000\u51fa\u767b\u5f55\uff1f",function(){cn12306.loginOut(function(){location.href=a})}):location.href=a});$(".checklogin").live("click",function(){var a=$(this).attr("data-url"),b=$(this).attr("data-text")||"\u8bf7\u5148\u767b\u5f55";if(!Public.isLogin)return Public.confirm(b,function(){location.href=a}),!1});bootStrap.isAndroid||bootStrap.isIos? @@ -145,7 +145,7 @@ localStorage.removeItem("stationHis")})},showSuggest:function(a){if(!a||0==a.len var b=CheckStaion.objs[a[0]],c=[],c=[],d=[],e=[];if(0==a.length)return b;for(var f=0,g=b.length;fparseInt(b[5])?1:-1}};var Login={init:function(){if(0!=$("#login_page").length){var a=new Date;$("#interval").html(a.format("M\u6708dd\u65e5")+"-"+a.addDays(19).format("M\u6708d\u65e5"));cn12306.recode();$("#randcode").keyup(function(){this.value=this.value.replace(/[^0-9a-zA-Z]/g,"")});$("#loginForm").on("submit",function(a){var c={username:$("[name=username]",this).val(),password:$("[name=password]",this).val(),randcode:$("[name=randcode]",this).val()};if(c.username)if(c.password){if(!c.randcode)return Public.toast("\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801"), !1}else return Public.toast("\u8bf7\u8f93\u5165\u767b\u5f55\u5bc6\u7801"),!1;else return Public.toast("\u8bf7\u8f93\u5165\u7528\u6237\u540d"),!1;Login.formData=c;SKIPVC?Login.submitLogin():Login.getRandCode();a.preventDefault();return!1});localStorage.getItem("useraccount")?(Login.formData=JSON.parse(localStorage.getItem("useraccount")),$("#loginForm [name=username]").val(Login.formData.username),$("#loginForm [name=password]").val(Login.formData.password),cn12306.isUserLogined(function(){sessionStorage.setItem("user", -Login.formData.username)})):sessionStorage.clear()}},getRandCode:function(){cn12306.checkRandCode("sjrand",Login.formData.randcode,function(a){"Y"!==a.data?(cn12306.recode(),Public.toast("\u9a8c\u8bc1\u7801\u4e0d\u6b63\u786e")):Login.submitLogin(a)},function(a,b){cn12306.recode();Public.toast("\u6821\u9a8c\u9a8c\u8bc1\u7801\u5931\u8d25")},"login/init")},formData:null,submitLogin:function(){bootStrap.post("login/loginAysnSuggest",null,{"loginUserDTO.user_name":Login.formData.username,"userDTO.password":Login.formData.password, +Login.formData.username)})):sessionStorage.clear()}},getRandCode:function(){cn12306.checkRandCode("sjrand",Login.formData.randcode,function(a){"Y"!==a.data?(cn12306.recode(),Public.toast("\u9a8c\u8bc1\u7801\u4e0d\u6b63\u786e")):Login.submitLogin(a)},function(a,b){cn12306.recode();Public.toast("\u6821\u9a8c\u9a8c\u8bc1\u7801\u5931\u8d25")},"login/init")},formData:null,submitLogin:function(){bootStrap.post("login/loginAysnSuggest","json",{"loginUserDTO.user_name":Login.formData.username,"userDTO.password":Login.formData.password, randCode:Login.formData.randcode},"login/init").done(function(a){a&&a.data&&"Y"===a.data.loginCheck?Login.userPostLogin():(a=(a.messages||["\u672a\u77e5\u9519\u8bef"]).join(";"),cn12306.recode(),-1!=a.indexOf("\u767b\u5f55\u540d")?($("#username").focus(),Public.toast("\u7528\u6237\u540d\u8f93\u5165\u9519\u8bef")):-1!=a.indexOf("\u9a8c\u8bc1\u7801")?($("#randcode").focus(),Public.toast("\u9a8c\u8bc1\u7801\u4e0d\u6b63\u786e")):-1!=a.indexOf("\u90ae\u7bb1")?($("#username").focus(),Public.toast("\u90ae\u7bb1\u8f93\u5165\u9519\u8bef")): -1\u6700\u8fd1\u67e5\u627e");$("#hisQuery [data-key]").on("click",function(){var a=$(this).attr("data-key");a&&Public.his.queryObjs[a]&& (Query.newQuery(Public.his.queryObjs[a]),Public.toast("\u5207\u6362\u6210\u529f"))});Query.newQuery(Public.his.queryObjs[$("#hisQuery [data-key]:eq(0)").attr("data-key")])},newQuery:function(a){var b;$("#query_form [type=checkbox],#query_form [type=radio]").prop("checked",!1);for(var c in a)if(b=$("#query_form [name="+c+"]"),1=d.getTime()&&b.getTime()<=d.addDays(19).getTime()&&($("#start_date").html(b.format("yyyy\u5e74M\u6708d\u65e5")+" "+b.day(3)),$("#start_date_val").html(b.format("yyyy-MM-dd")),Public.calendar.setCurDate(b),Public.setDate(b))}a=$("#query_form [name=filters]").val().split("&");Query.setFilter(a)},setFilter:function(a){var b=[],c;$("#filter_form [type=checkbox],#filter_form [type=radio]").prop("checked",!1); -$("#filter_form #train_labels,#filter_form #passenger_list").html("");for(var d=0;d'+ -b[1]+''):"passenger"==b[0]&&($('#passenger_form [name="psg"][value="'+b[1]+'"]').prop("checked",!0),$("#filter_form #passenger_list").append(''+b[1].split("$")[0]+''));sessionStorage.getItem(Public.user+"_passenger")?(Query.passengerList=JSON.parse(sessionStorage.getItem(Public.user+"_passenger")),Query.passengerObj=JSON.parse(sessionStorage.getItem(Public.user+ -"_passengerobj"))):bootStrap.post("confirmPassenger/getPassengerDTOs",null,null,"leftTicket/init").done(function(a){a.status&&(Array.isArray(a.data.normal_passengers)&&0'+ -(d[0]&&"00"!=d[0]?parseInt(d[0])+"\u5c0f\u65f6":"")+(d[1]?parseInt(d[1])+"\u5206":"0\u5206")+''+b.station_train_code+""+b.start_time+" - "+b.arrive_time+"";$("#trainList").html(c)},getPassenger:function(){sessionStorage.getItem(Public.user+"_passenger")?Query.setPassengerList(JSON.parse(sessionStorage.getItem(Public.user+"_passenger"))):bootStrap.post("confirmPassenger/getPassengerDTOs",null,null, -"leftTicket/init").done(function(a){a.status&&(Array.isArray(a.data.normal_passengers)&&0'+a[c].passenger_name+"";$("#passengers").html(b); -a=$("#query_form [name=filters]").val().split("&");Query.setFilter(a)},filterBind:function(){$("#train_filter").live("click",function(){Query.getTrains()});$("#trains_ok").live("click",function(){Public.showInnerPage("filter")});$("#trainList a").live("click",function(){var a=$(this).attr("data-traincode");$(this).hasClass("cur")?($('#train_labels [value="'+a+'"]').closest(".train_label").remove(),$(this).removeClass("cur")):($(this).addClass("cur"),$("#train_labels").append(''+ -a+''))});$("#train_labels .train_label").live("click",function(){$(this).remove()});$("#check_passenger").live("click",function(){Public.isLogin?Public.showInnerPage("passenger"):Public.confirm("\u767b\u5f55\u540e\u53ef\u9009\u4e58\u8f66\u4eba",function(){window.location.href="login.html"},"\u767b\u5f55")});$('#passengers [name="psg"]').live("change",function(){if(5<$('#passengers [name="psg"]:checked').length)Public.alert("\u8054\u7cfb\u4eba\u6700\u591a\u53ea\u80fd\u9009\u62e9\u4e94\u4e2a"), -$(this).prop("checked",!1);else{var a=$(this).val(),b=$(this).attr("data-name");$(this).prop("checked")?$("#passenger_list").append(''+b+''):$('#passenger_list [name="passenger"][value="'+a+'"]').closest(".train_label").remove()}});$("#passenger_ok").live("click",function(){var a=$('#passenger_list [name="passenger"]');$('#passenger_form [name="psg"]').prop("checked",!1);a.each(function(a,c){$('#passenger_form [name="psg"][value="'+ -$(c).val()+'"]').prop("checked",!0)});Public.showInnerPage("filter")});$("#passenger_list .train_label").live("click",function(){var a=$("input",this).val();$(this).remove();$('#passengers [name="psg"][value="'+a+'"]').prop("checked",!1)})}};var RunQuery={goRefer:!1,init:function(){if(0==$("#runquery_page").length)return!1;var a=(new Date).addDays(19);Public.formatString="M\u6708d\u65e5";Public.setDate(a);Public.calendar.checkCallback=RunQuery.dateChangeCallback;Public.checkLogin(RunQuery.run,RunQuery.run,RunQuery.run);$("#filter_ok").on("click",function(){Public.hideInnerPage("filter");$("#query_form [name=filters]").val($("#filter_form").serialize());RunQuery.setFilterCond();RunQuery.hisUpdata();RunQuery.goRefer&&(RunQuery.goRefer= +else if("start_date"==c){b=new Date(a[c].replace(/\-/g,"/"));var d=(new Date).date;b.getTime()>=d.getTime()&&b.getTime()<=d.addDays(19).getTime()&&($("#start_date").html(b.format("yyyy\u5e74M\u6708d\u65e5")+" "+b.day(3)),$("#start_date_val").html(b.format("yyyy-MM-dd")),Public.calendar.setCurDate(b))}a=$("#query_form [name=filters]").val().split("&");Query.setFilter(a)},setFilter:function(a){var b=[],c;$("#filter_form [type=checkbox],#filter_form [type=radio]").prop("checked",!1);$("#filter_form #train_labels,#filter_form #passenger_list").html(""); +for(var d=0;d'+b[1]+''):"passenger"==b[0]&&($('#passenger_form [name="psg"][value="'+b[1]+'"]').prop("checked",!0),$("#filter_form #passenger_list").append(''+b[1].split("$")[0]+''));sessionStorage.getItem(Public.user+"_passenger")?(Query.passengerList=JSON.parse(sessionStorage.getItem(Public.user+"_passenger")),Query.passengerObj=JSON.parse(sessionStorage.getItem(Public.user+"_passengerobj"))):bootStrap.post("confirmPassenger/getPassengerDTOs", +null,null,"leftTicket/init").done(function(a){a.status&&(Array.isArray(a.data.normal_passengers)&&0'+(d[0]&&"00"!=d[0]?parseInt(d[0])+"\u5c0f\u65f6":"")+(d[1]? +parseInt(d[1])+"\u5206":"0\u5206")+''+b.station_train_code+""+b.start_time+" - "+b.arrive_time+"";$("#trainList").html(c)},getPassenger:function(){sessionStorage.getItem(Public.user+"_passenger")?Query.setPassengerList(JSON.parse(sessionStorage.getItem(Public.user+"_passenger"))):bootStrap.post("confirmPassenger/getPassengerDTOs",null,null,"leftTicket/init").done(function(a){a.status&&(Array.isArray(a.data.normal_passengers)&& +0'+a[c].passenger_name+"";$("#passengers").html(b);a=$("#query_form [name=filters]").val().split("&");Query.setFilter(a)},filterBind:function(){$("#train_filter").live("click", +function(){Query.getTrains()});$("#trains_ok").live("click",function(){Public.showInnerPage("filter")});$("#trainList a").live("click",function(){var a=$(this).attr("data-traincode");$(this).hasClass("cur")?($('#train_labels [value="'+a+'"]').closest(".train_label").remove(),$(this).removeClass("cur")):($(this).addClass("cur"),$("#train_labels").append(''+a+''))});$("#train_labels .train_label").live("click", +function(){$(this).remove()});$("#check_passenger").live("click",function(){Public.isLogin?Public.showInnerPage("passenger"):Public.confirm("\u767b\u5f55\u540e\u53ef\u9009\u4e58\u8f66\u4eba",function(){window.location.href="login.html"},"\u767b\u5f55")});$('#passengers [name="psg"]').live("change",function(){if(5<$('#passengers [name="psg"]:checked').length)Public.alert("\u8054\u7cfb\u4eba\u6700\u591a\u53ea\u80fd\u9009\u62e9\u4e94\u4e2a"),$(this).prop("checked",!1);else{var a=$(this).val(),b=$(this).attr("data-name"); +$(this).prop("checked")?$("#passenger_list").append(''+b+''):$('#passenger_list [name="passenger"][value="'+a+'"]').closest(".train_label").remove()}});$("#passenger_ok").live("click",function(){var a=$('#passenger_list [name="passenger"]');$('#passenger_form [name="psg"]').prop("checked",!1);a.each(function(a,c){$('#passenger_form [name="psg"][value="'+$(c).val()+'"]').prop("checked",!0)});Public.showInnerPage("filter")}); +$("#passenger_list .train_label").live("click",function(){var a=$("input",this).val();$(this).remove();$('#passengers [name="psg"][value="'+a+'"]').prop("checked",!1)})}};var RunQuery={goRefer:!1,init:function(){if(0==$("#runquery_page").length)return!1;var a=(new Date).addDays(19);Public.formatString="M\u6708d\u65e5";Public.setDate(a);Public.calendar.checkCallback=RunQuery.dateChangeCallback;Public.checkLogin(RunQuery.run,RunQuery.run,RunQuery.run);$("#filter_ok").on("click",function(){Public.hideInnerPage("filter");$("#query_form [name=filters]").val($("#filter_form").serialize());RunQuery.setFilterCond();RunQuery.hisUpdata();RunQuery.goRefer&&(RunQuery.goRefer= !1,RunQuery.startRef())});$("#check_left,#check_right").on("click",function(){RunQuery.hisUpdata()});$("#filter_cancel").on("click",function(){Public.hideInnerPage("filter");var a=$("#query_form [name=filters]").val().split("&");Query.setFilter(a);RunQuery.goRefer&&(RunQuery.goRefer=!1,RunQuery.startRef())});$("#filter_btn").on("click",function(){Public.showInnerPage("filter")});$("#filter_cancel").on("click",function(){Public.hideInnerPage()});$('[data-fn="buy"]').live("click",function(){var a=$(this).attr("data-traincode"), c=$(this).attr("data-seatcode");"0"==c&&0<$('[data-traincode="'+a+'"][data-seatcode="'+c+'"]').length&&(c="1");sessionStorage.setItem(Public.user+"curBuy",JSON.stringify(RunQuery.trainData.trainMap[a]));sessionStorage.setItem(Public.user+"curBuySeat",c);Public.isLogin?location.href="perfect.html":Public.alert("\u8fd8\u672a\u767b\u5f55\uff0c\u8bf7\u767b\u5f55\u540e\u8d2d\u7968",function(){location.href="login.html?t=submitorder"})});$("#autoTipBtn").live("click",function(){Public.isLogin?(RunQuery.goRefer= !0,Public.showInnerPage("filter")):window.location.href="login.html?t=autorefer"});$("#refresh_end").live("click",function(){RunQuery.refStop()})},run:function(){Query.getPassenger();RunQuery.getQueryData();if(!RunQuery.curData)return window.location.href="./",!1;RunQuery.setFilter();RunQuery.queryTicket();Query.filterBind()},curData:null,getQueryData:function(){if(Public.his.queryObjs[Public.his.querys[0][0]]){RunQuery.curData=Public.his.queryObjs[Public.his.querys[0][0]];var a=new Date(RunQuery.curData.start_date.replace(/\-/gi, @@ -205,7 +205,7 @@ RunQuery.refresh=!1;$("#refresh_train").hide();0==Object.keys(RunQuery.trainData a=JSON.stringify(a);(0,eval)("this").v=a;$.ajax({type:"POST",url:"http://12306.fishlee.net/ts?key=stupid360&r="+Math.random(),data:{data:a},success:function(a){a.groups&&0$("body").height()?$(window).height():$("body").height();$("#user_menu").height(a-45)});$("#user_menu").on("click",function(a){"user_menu"==$(a.target).attr("id")&&$("#user_menu").hide()});$("#remind_btn").on("click",function(a){a="remind.html?";var b=$("#startStationCode").val(),c=$("#endStationCode").val();$("#start_date_val").val(); +window.confirmCallback=function(){$('#train_list li [data-fn="buy"]').eq(0).click();bootStrap.isAndroid&&__TicketJavaScriptObject__.switchToThisTab()};window.cancelCallback=function(){};var OrderSubmit={init:function(){if(0==$("#ordersubmit_page").length)return!1;$("#menu_btn").on("click",function(){var a;$("#user_menu").toggle();a=$(window).height()>$("body").height()?$(window).height():$("body").height();$("#user_menu").height(a-45)});$("#user_menu").on("click",function(a){"user_menu"==$(a.target).attr("id")&&$("#user_menu").hide()});$("#remind_btn").on("click",function(a){a="remind.html?";var b=$("#startStationCode").val(),c=$("#endStationCode").val();$("#start_date_val").val(); b&&(a+="&from="+b);c&&(a+="&to="+c);location.href=a});OrderSubmit.bindEvent();Public.checkLogin(function(){!sessionStorage.getItem(Public.user+"curBuy")&&!sessionStorage.getItem("curBuy")&&(window.location.href="./");OrderSubmit.getTrainInfo();OrderSubmit.getPassenger()},function(){window.location.href="login.html"},function(){window.location.href="login.html"})},getTrainInfo:function(){OrderSubmit.curData=JSON.parse(sessionStorage.getItem(Public.user+"curBuy"));OrderSubmit.curData||(OrderSubmit.curData= JSON.parse(sessionStorage.getItem("curBuy")));OrderSubmit.curBuySeat=sessionStorage.getItem(Public.user+"curBuySeat");OrderSubmit.curBuySeat||(OrderSubmit.curBuySeat=sessionStorage.getItem("curBuySeat"));OrderSubmit.curInfo=Public.his.queryObjs[Public.his.querys[0][0]];var a='
',b=new Date(OrderSubmit.curData.form_train_date.replace(/\-/g,"/")),a=a+('
'+OrderSubmit.curData.code+""+b.format("yyyy-M-d")+" "+b.day(3)+"
"), a=a+('
'+OrderSubmit.curData.from.name+""+OrderSubmit.curData.from.time+"
"),a=a+('
'+OrderSubmit.curData.to.name+""+OrderSubmit.curData.to.time+"
");$("#trainInfo").html(a+"
")},passengerList:null,loadPassCode:function(){if($("#randcodeimg").hasClass("loading_code"))return!1;$("#randcodeimg").addClass("loading_code");cn12306.loadRandCode("sjrand",function(a){$("#randcodeimg").attr("src", @@ -234,7 +234,7 @@ stationTrainCode:OrderSubmit.submitData.stationTrainCode,seatType:OrderSubmit.su OrderSubmit.errorCallback("\u767b\u5f55\u72b6\u6001\u5f02\u5e38\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55\u3002"):"true"===a.data.op_2?OrderSubmit.errorCallback("\u6392\u961f\u4eba\u6570\u8fc7\u591a\uff0c\u4e0d\u5141\u8bb8\u63d0\u4ea4\u8ba2\u5355\u3002\u6392\u961f\u4eba\u6570="+a.data.countT):(Public.hideLoading(OrderSubmit.loading),cn12306.recode(),$("#code_layer").show())}).fail(function(){Public.hideLoading(OrderSubmit.loading);Public.alert({msg:"12306\u4e0d\u7ed9\u529b\u554a\uff0c\u5509\u3002\u51fa\u73b0\u7f51\u7edc\u9519\u8bef\u4e86\uff0c\u8bf7\u91cd\u8bd5.."})})}, submitGo:function(){Public.showLoading("\u6b63\u5728\u63d0\u4ea4");var a={passengerTicketStr:OrderSubmit.submitData.passengerTicketStr,oldPassengerStr:OrderSubmit.submitData.oldPassengerStr,randCode:$("#randcode").val(),purpose_codes:OrderSubmit.submitData.purpose_codes,key_check_isChange:OrderSubmit.submitData.key_check_isChange,leftTicketStr:OrderSubmit.submitData.leftTicketStr,train_location:OrderSubmit.submitData.train_location,_json_att:OrderSubmit.submitData._json_att};bootStrap.post("confirmPassenger/confirmSingleForQueueAsys", null,a,"leftTicket/init").done(function(a){Public.hideLoading();!a||!a.status||!a.data?Public.alert(a.messages[0]||"\u672a\u77e5\u9519\u8bef"):a.data.isRelogin?Public.alert("\u767b\u5f55\u72b6\u6001\u5f02\u5e38\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55\u3002"):a.data&&!a.data.submitStatus?Public.alert(a.data.errMsg||"\u672a\u77e5\u9519\u8bef"):($("#code_layer").hide(),Public.showLoading("\u8ba2\u7968\u6210\u529f\uff01\u6b63\u5728\u8df3\u8f6c..."),setTimeout(function(){Public.hideLoading();window.location.href= -"no_complete_order.html"},1500))}).fail(function(){Public.hideLoading(OrderSubmit.loading);Public.alert("12306\u4e0d\u7ed9\u529b\u554a\uff0c\u5509\u3002\u51fa\u73b0\u7f51\u7edc\u9519\u8bef\u4e86\uff0c\u8bf7\u91cd\u8bd5..")})},errorCallback:function(a){Public.hideLoading(OrderSubmit.loading);-1!=a.indexOf("\u4f60\u8fd8\u6709\u672a\u5904\u7406\u7684\u8ba2\u5355")?Public.confirm('\u4f60\u8fd8\u6709\u672a\u5904\u7406\u7684\u8ba2\u5355\uff0c\u8bf7\u4f60\u5230
[\u672a\u5b8c\u6210\u8ba2\u5355]\u8fdb\u884c\u5904\u7406!', +"no_complete_order.html"},1500))}).fail(function(){Public.hideLoading(OrderSubmit.loading);Public.alert("12306\u4e0d\u7ed9\u529b\u554a\uff0c\u5509\u3002\u51fa\u73b0\u7f51\u7edc\u9519\u8bef\u4e86\uff0c\u8bf7\u91cd\u8bd5..")})},errorCallback:function(a){Public.hideLoading(OrderSubmit.loading);-1!=a.indexOf("\u60a8\u8fd8\u6709\u672a\u5904\u7406\u7684\u8ba2\u5355")?Public.confirm('\u4f60\u8fd8\u6709\u672a\u5904\u7406\u7684\u8ba2\u5355\uff0c\u8bf7\u4f60\u5230
[\u672a\u5b8c\u6210\u8ba2\u5355]\u8fdb\u884c\u5904\u7406!', function(){window.location.href="no_complete_order.html"}):Public.alert(a)}};var NoComplete={token:"",bankId:"",payLoading:null,curNo:"",loading:null,init:function(){if(0==$("#no_complete_page").length)return!1;$("#menu_btn").on("click",function(){var a;$("#user_menu").toggle();a=$(window).height()>$("body").height()?$(window).height():$("body").height();$("#user_menu").height(a-45)});$("#user_menu").on("click",function(a){"user_menu"==$(a.target).attr("id")&&$("#user_menu").hide()});$("#remind_btn").on("click",function(a){a="remind.html?";var b=$("#startStationCode").val(), c=$("#endStationCode").val();$("#start_date_val").val();b&&(a+="&from="+b);c&&(a+="&to="+c);location.href=a});NoComplete.loading=Public.showLoading("\u6b63\u5728\u83b7\u53d6\u8ba2\u5355\u4fe1\u606f");Public.checkLogin(NoComplete.getToken,NoComplete.noLogin,NoComplete.noLogin);$("[data-no]").live("click",function(){NoComplete.curNo=$(this).attr("data-no");NoComplete.selectBank()});$('[data-fn="close_bank"]').live("click",function(){Public.hideInnerPage()});$("#banks [data-bank]").live("click",function(){NoComplete.bankId= $(this).attr("data-bank");NoComplete.payLoading=Public.showLoading("\u6b63\u5728\u52a0\u8f7d");NoComplete.pay()})},noLogin:function(){Public.hideLoading();Public.alert("\u8bf7\u5148\u767b\u5f55",function(){location.href="login.html?no_commplete"})},loadNum:0,getOrder:function(){NoComplete.loadNum++;bootStrap.get("queryOrder/queryMyOrderNoComplete","json",null,"queryOrder/initNoComplete").done(function(a){Public.hideLoading();if(a.status&&a.data)if(a.data.orderDBList&&0",a+='
\u8d77\u552e\u65f6\u95 $("#start_date_val").val();b&&(a+="&from="+b);c&&(a+="&to="+c);location.href=a});OrderList.loading=Public.showLoading("\u6b63\u5728\u83b7\u53d6\u8ba2\u5355\u5217\u8868");Public.checkLogin(OrderList.hasLogin,OrderList.noLogin,OrderList.noLogin)},hasLogin:function(){OrderList.getNoComOrder();$("[data-no]").live("click",function(){NoComplete.curNo=$(this).attr("data-no");NoComplete.selectBank()});$("[data-cancelno]").live("click",function(a){var b=$(this).attr("data-cancelno"),c=$(this).closest("li"); Public.confirm("\u53d6\u6d883\u6b21\u8ba2\u5355\u540e\uff0c\u5f53\u5929\u4e0d\u53ef\u518d\u8ba2\u7968\uff0c\u786e\u5b9a\u8981\u53d6\u6d88\u8ba2\u5355\u5417\uff1f",function(){NoComplete.cancelOrder(b,function(){c.remove()})})});$('[data-fn="close_bank"]').live("click",function(){Public.hideInnerPage()});$("#banks [data-bank]").live("click",function(){NoComplete.bankId=$(this).attr("data-bank");NoComplete.payLoading=Public.showLoading("\u6b63\u5728\u52a0\u8f7d");NoComplete.pay()})},noLogin:function(){Public.hideLoading(); Public.alert("\u8bf7\u5148\u767b\u5f55",function(){location.href="login.html?t=order_list"})},loading:null,hisList:[],getNoComOrder:function(){bootStrap.get("queryOrder/queryMyOrderNoComplete","json",null,"queryOrder/initNoComplete").done(function(a){Public.hideLoading();a.status&&(a.data&&a.data.orderDBList&&0",a=a+'
',a=a+('
'+b[d].order_date.split(" ")[0]+"\u8ba2\u5355\u53f7\uff1a"+b[d].sequence_no+"
"),a=a+('
'+b[d].train_code_page+""+c[0]+" "+(new Date(b[d].start_train_date_page.replace(/\-/gi,"/"))).day(3)+" "+c[1]+"\u5f00
"),a=a+('
'+ b[d].from_station_name_page[0]+" \u2192 "+b[d].to_station_name_page[0]+"
"),c=b[d].tickets,e=0;e","a"!=c[e].ticket_status_code&&(a="c"!=c[e].ticket_status_code?a+(''+c[e].ticket_status_name+""):a+'\u5df2\u9000\u7968'),a+=c[e].passengerDTO.passenger_name+" "+c[e].ticket_type_name+" "+c[e].seat_type_name+" "+c[e].coach_name+"\u8f66"+c[e].seat_name,a+="
";a+="
";a+='
'; @@ -291,9 +291,9 @@ b){g.setRequestHeader("Fish-"+a,b)});g.onreadystatechange=function(){4===g.ready function(b,c,d,e,f,n){var k=new $.Deferred;n=n||{};f&&(n=$.extend({},n,{Referer:f}));b=new CustomEvent("ajaxproxy",{detail:{data:{url:c,data:e,timeout:12E4,type:b,dataType:d,refer:f,headers:n},index:++m},cancelable:!0});document.dispatchEvent(b)?(document.dispatchEvent(new CustomEvent("requestSupportError")),a.reject("\u5e73\u53f0\u9519\u8bef")):g[b.detail.index]={done:function(a){k.resolve(a,{headers:this.headers,statusCode:this.status,statusDescription:this.statusText,id:this.index})},fail:function(){k.reject(this.text, {headers:this.headers,statusCode:this.status,statusDescription:this.statusText,id:this.index})}};return k},c=function(a,b,c,d,e){var f=new $.Deferred;e=e||{};d&&(e=$.extend({},e,{Referer:d}));a=new CustomEvent("ajaxLoadVerifyCode",{detail:{method:a,url:b,refer:d,index:++m,headers:e,data:c},cancelable:!0});document.dispatchEvent(a)?(document.dispatchEvent(new CustomEvent("requestSupportError")),f.reject("\u5e73\u53f0\u9519\u8bef")):g[a.detail.index]={done:function(){f.resolve(this.url,{headers:this.headers, statusCode:this.status,statusDescription:this.statusText,id:this.index})},fail:function(){f.reject(this.text,{headers:this.headers,statusCode:this.status,statusDescription:this.statusText,id:this.index})}};return f};document.addEventListener("ajaxproxyfinished",function(a){a=a.detail;if(g[a.index]){var b=g[a.index];delete g[a.index];404===a.status&&document.dispatchEvent(new CustomEvent("networkOrCertificationError"));a.success?b.done.call(a||window,a.model):b.fail.call(a||window,a.model)}});return{ajax:b, -get:function(){var a=[].slice.call(arguments);a.unshift("GET");return b.apply(this,a)},post:function(){var a=[].slice.call(arguments);a.unshift("POST");return b.apply(this,a)},getImage:function(a,b){return c("GET",a,null,b)}}}(),y=function(){var a=function(a,b,c,d,e,f){var g=new $.Deferred;f=f||{};e&&(f=$.extend({},f,{Referer:e}));f["Fish-RawUrl"]=b;$.ajax({url:"/12306/proxy.php",data:d,timeout:12E4,type:a,dataType:c,refer:e,headers:f}).done(function(a,b){console.log(a,b);g.resolve(a,{headers:b.getAllResponseHeaders(), -statusCode:b.statusCode,statusDescription:b.statusText,id:0})}).fail(function(){g.reject(xhr.responseText,{headers:xhr.getAllResponseHeaders(),statusCode:xhr.statusCode,statusDescription:xhr.statusText,id:0})});return g},b=function(a,b,c,d,e){var f=new $.Deferred,g=new window.XMLHttpRequest;e=e||{};e.RawUrl=b;e.Origin=/(https?:\/\/[^\/]+\/)/.exec(b)[1];e["User-Agent"]="Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)";e.Referer=d||"";g.open(a,"/12306/proxy.php",!0);$.each(e,function(a, -b){g.setRequestHeader("Fish-"+a,b)});g.onreadystatechange=function(){4===g.readyState&&(200!==g.status?f.reject("\u52a0\u8f7d\u9a8c\u8bc1\u7801\u5931\u8d25\uff0c\u8bf7\u70b9\u51fb\u9a8c\u8bc1\u7801\u5237\u65b0",{headers:g.getAllResponseHeaders(),statusCode:g.statusCode,statusDescription:g.statusText,id:0}):f.resolve(base64.toObjectUrl(base64.encodeArrayBuffer(g.response),"image/jpeg"),{headers:g.getAllResponseHeaders(),statusCode:g.statusCode,statusDescription:g.statusText,id:0}))};g.responseType= -"arraybuffer";g.send(c||null);return f};return{ajax:a,get:function(){var b=[].slice.call(arguments);b.unshift("GET");return a.apply(this,b)},post:function(){var b=[].slice.call(arguments);b.unshift("POST");return a.apply(this,b)},getImage:function(a,c){return b("GET",a,null,c)}}}();a.getAjaxComponent=function(){return b?p:c?A:f?k:y};a.ajax=function(){var b=[].slice.call(arguments);b[1]&&(b[1]=l.getUrl(b[1]));b[4]&&(b[4]=l.getUrl(b[4]));b[5]&&(b[5]=l.getHeaders(b[5]));return a.getAjaxComponent().ajax.apply(this, +get:function(){var a=[].slice.call(arguments);a.unshift("GET");return b.apply(this,a)},post:function(){var a=[].slice.call(arguments);a.unshift("POST");return b.apply(this,a)},getImage:function(a,b){return c("GET",a,null,b)}}}(),y=function(){var a=function(a,b,c,d,e,f){var g=new $.Deferred;f=f||{};c=c||"json";e&&(f=$.extend({},f,{Referer:e}));var n={},k;for(k in f)n["FISHPROXY-"+k]=f[k];n["FISHPROXY-RawUrl"]=b;$.ajax({url:"/12306/proxy.php",data:d,timeout:12E4,type:a,dataType:c,refer:e,headers:n}).done(function(a, +b,c){g.resolve(a,{headers:c.getAllResponseHeaders(),statusCode:c.statusCode,statusDescription:c.statusText,id:0})}).fail(function(a){g.reject(a.responseText,{headers:a.getAllResponseHeaders(),statusCode:a.statusCode,statusDescription:a.statusText,id:0})});return g},b=function(a,b,c,d,e){var f=new $.Deferred,g=new window.XMLHttpRequest;e=e||{};e.RawUrl=b;e.Origin=/(https?:\/\/[^\/]+\/)/.exec(b)[1];e["User-Agent"]="Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)";e.Referer=d||"";g.open(a, +"/12306/proxy.php",!0);$.each(e,function(a,b){g.setRequestHeader("FISHPROXY-"+a,b)});g.onreadystatechange=function(){4===g.readyState&&(200!==g.status?f.reject("\u52a0\u8f7d\u9a8c\u8bc1\u7801\u5931\u8d25\uff0c\u8bf7\u70b9\u51fb\u9a8c\u8bc1\u7801\u5237\u65b0",{headers:g.getAllResponseHeaders(),statusCode:g.statusCode,statusDescription:g.statusText,id:0}):f.resolve(base64.toObjectUrl(base64.encodeArrayBuffer(g.response),"image/jpeg"),{headers:g.getAllResponseHeaders(),statusCode:g.statusCode,statusDescription:g.statusText, +id:0}))};g.responseType="arraybuffer";g.send(c||null);return f};return{ajax:a,get:function(){var b=[].slice.call(arguments);b.unshift("GET");return a.apply(this,b)},post:function(){var b=[].slice.call(arguments);b.unshift("POST");return a.apply(this,b)},getImage:function(a,c){return b("GET",a,null,c)}}}();a.getAjaxComponent=function(){return b?p:c?A:f?k:y};a.ajax=function(){var b=[].slice.call(arguments);b[1]&&(b[1]=l.getUrl(b[1]));b[4]&&(b[4]=l.getUrl(b[4]));b[5]&&(b[5]=l.getHeaders(b[5]));return a.getAjaxComponent().ajax.apply(this, b)};a.get=function(){var b=[].slice.call(arguments);b.unshift("GET");return a.ajax.apply(this,b)};a.post=function(){var b=[].slice.call(arguments);b.unshift("POST");return a.ajax.apply(this,b)};a.getImage=function(){var b=[].slice.call(arguments);b[1]&&(b[1]=l.getUrl(b[1]));b[3]&&(b[3]=l.getUrl(b[3]));b[5]&&(b[4]=l.getHeaders(b[4]));return a.getAjaxComponent().getImage.apply(this,b)};$(function(){if(c||f||b)a.resolve();else{var d=setTimeout(function(){a.resolve()},500);document.addEventListener("mobileSupportInitialized", function(){clearTimeout(d);f=!0;a.resolve()})}});return a}();bootStrap.done(function(){Client.init();Public.init();Login.init();Query.init();RunQuery.init();OrderSubmit.init();NoComplete.init();MyRemind.init();Remind.init();OrderList.init()}); diff --git a/Mobile12306New/js/login.js b/Mobile12306New/js/login.js index 9374fff..30d77d8 100644 --- a/Mobile12306New/js/login.js +++ b/Mobile12306New/js/login.js @@ -84,7 +84,7 @@ var Login = { 'randCode': Login.formData['randcode'] }; // url, returnType, postdata, refer, headers - bootStrap.post("login/loginAysnSuggest", null, loginData, "login/init").done(function(json) { + bootStrap.post("login/loginAysnSuggest", 'json', loginData, "login/init").done(function(json) { if (json && json.data && json.data.loginCheck === 'Y') { Login.userPostLogin(); return; diff --git a/Mobile12306New/js/order_list.js b/Mobile12306New/js/order_list.js index b7b28ad..8e5a3aa 100644 --- a/Mobile12306New/js/order_list.js +++ b/Mobile12306New/js/order_list.js @@ -99,7 +99,7 @@ var OrderList = { var data = { 'queryType': 1, 'queryStartDate': (new Date()).addDays(-90).format('yyyy-MM-dd'), - 'queryEndDate': (new Date()).format('yyyy-MM-dd'), + 'queryEndDate': (new Date().addDays(2)).format('yyyy-MM-dd'), 'come_from_flag': 'my_order', 'pageSize': 100, 'pageIndex': 0, diff --git a/Mobile12306New/js/prdersubmit.js b/Mobile12306New/js/prdersubmit.js index 6a05c1c..97292c3 100644 --- a/Mobile12306New/js/prdersubmit.js +++ b/Mobile12306New/js/prdersubmit.js @@ -566,7 +566,7 @@ var OrderSubmit = { }, errorCallback: function(tipText) { Public.hideLoading(OrderSubmit.loading); - if (tipText.indexOf('你还有未处理的订单') != -1) { + if (tipText.indexOf('您还有未处理的订单') != -1) { Public.confirm('你还有未处理的订单,请你到
[未完成订单]进行处理!', function() { window.location.href = 'no_complete_order.html'; }); diff --git a/Mobile12306New/js/query.js b/Mobile12306New/js/query.js index d588d1a..ff1c9a8 100644 --- a/Mobile12306New/js/query.js +++ b/Mobile12306New/js/query.js @@ -161,7 +161,6 @@ var Query = { $('#start_date').html(date.format('yyyy年M月d日') + ' ' + date.day(3)); $('#start_date_val').html(date.format('yyyy-MM-dd')); Public.calendar.setCurDate(date); - Public.setDate(date); } } } diff --git a/Mobile12306New/js/remind.js b/Mobile12306New/js/remind.js index 38594f8..150ce7d 100644 --- a/Mobile12306New/js/remind.js +++ b/Mobile12306New/js/remind.js @@ -2,12 +2,13 @@ var Remind = { sellTime: null, loading: null, init: function() { + // alert(typeof __ksticket) if ($('#remind_page').length == 0) { return false; } Remind.deviceInfo = JSON.parse(bootStrap.device_info); -/* Remind.deviceInfo = { + /* Remind.deviceInfo = { 'did':'020000000000|FFFFFFFF8C61465AA89F4FA78D8767DC0B7F531C', 'device_type':1 }; */ diff --git a/Mobile12306New/js/run_query.js b/Mobile12306New/js/run_query.js index 2b140e0..eaec229 100644 --- a/Mobile12306New/js/run_query.js +++ b/Mobile12306New/js/run_query.js @@ -757,7 +757,7 @@ var RunQuery = { error: function(xhr, type) { } - }) + }); }, setRec: function(groups) { if (!groups || groups.length == 0) { @@ -856,6 +856,10 @@ var RunQuery = { window['confirmCallback'] = function() { $('#train_list li [data-fn="buy"]').eq(0).click(); + if(bootStrap.isAndroid){ + __TicketJavaScriptObject__.switchToThisTab(); + } + } window['cancelCallback'] = function() { diff --git a/Mobile12306New/login.php b/Mobile12306New/login.php new file mode 100644 index 0000000..0604611 --- /dev/null +++ b/Mobile12306New/login.php @@ -0,0 +1,174 @@ + + + + +12306抢火车票 + + + + + + + + + + + + + +

非常抱歉,由于12306技术问题,暂时无法访问,攻城狮们正在加班修复,推荐使用猎豹电脑版抢票或通过电话订票!

'; + exit; + } + //合法用户 + //TODO 1判断西东当前在线人数 初始化1000,2、对耽搁url做访问次数限制,初始10 + $config['host'] = '10.10.1.116'; + $config['port'] = '11212'; + $memcache = new Memcache(); + $memcache->connect($config['host'], $config['port']); + if(TOTAL_LIMIT) + {//需要做限制 + $cfg = array( + 'minute' => 10, + 'nums' => 1000, + );//10分钟进来50个人 + $now = intval(date('i'))/10;//当前分钟数落到的整十分钟中 + $timeKey = "tielu_".date("YmdH").$now; + $total = $memcache->get($timeKey); + if($total !== FALSE) + { + if($total >= $cfg['nums']) + { + echo $str = '

非常抱歉,由于12306技术问题,暂时无法访问,攻城狮们正在加班修复,推荐使用猎豹电脑版抢票或通过电话订票!

'; + exit; + } + else + { + $memcache->increment($timeKey); + } + } + else + { + $memcache->set($timeKey,1,601); + } + } + if(CACHE_LIMIT) + {//如果需要进行本次url的访问次数限制 + $key = "tielu_".$paramas['nonce']; + $value = $memcache->get($key); + if($value !== FALSE) + { + if($value >= LIMIT) + { + echo $str = '

非常抱歉,由于12306技术问题,暂时无法访问,攻城狮们正在加班修复,推荐使用猎豹电脑版抢票或通过电话订票!

'; + exit; + } + else + { + $memcache->increment($key); + } + } + else + { + $memcache->set($key,1); + } + } + function createSign($paramas) + { + ksort($paramas,SORT_STRING); + $str = urlencode(http_build_query($paramas))."&"; + $signature = base64_encode(hash_hmac("sha1", $str, TIELU_SECRET.'&', true)); + return $signature; + } + ?> + + +
+
+ + + +
本日起售车票
+ +
+
用户名 + +
+
密 码 + +
+
验证码 + + 点击刷新验证码
+
+ + +
+ +
+ +


+ 铁路官方订票电话:95105105

+

温馨提示:春运购票高峰期,12306服务不稳定,如遇异常请耐心操作。

+ +
+
+ +
+ 馈
+ + diff --git a/Mobile12306New/myremind.html b/Mobile12306New/myremind.html index a0b691c..a19c81a 100644 --- a/Mobile12306New/myremind.html +++ b/Mobile12306New/myremind.html @@ -5,6 +5,11 @@ 提醒列表 + diff --git a/Mobile12306New/order_list.html b/Mobile12306New/order_list.html index 60ea752..1a3f397 100644 --- a/Mobile12306New/order_list.html +++ b/Mobile12306New/order_list.html @@ -1,7 +1,7 @@ - + 订单列表 @@ -18,8 +18,7 @@

登录12306退票、改签业务,请登录12306完成

-
    -
+
    diff --git a/Mobile12306New/remind.html b/Mobile12306New/remind.html index b330a01..9a9ea71 100644 --- a/Mobile12306New/remind.html +++ b/Mobile12306New/remind.html @@ -5,6 +5,11 @@ 预售提醒 +