diff --git a/Mobile12306New/css/css.css b/Mobile12306New/css/css.css
index 0b3dd9e..f48faf3 100644
--- a/Mobile12306New/css/css.css
+++ b/Mobile12306New/css/css.css
@@ -92,7 +92,7 @@ input[type=radio]:checked:after{content:''; display:block; width:12px; height:12
.icon_remove:after{-webkit-transform:rotate(-45deg);}
.header{width:100%; height:45px; line-height:45px; position:relative; overflow:hidden; background:#fa8c13; color:#FFF; font-size:0.75rem; text-align:center;}
-.h_l,.h_r{position:absolute; top:0;}
+.h_l,.h_r{position:absolute; top:0; white-space:nowrap;}
.h_l{left:15px;}
.h_r{right:15px;}
.h_t{font-size:1.0625rem;}
@@ -101,7 +101,7 @@ input[type=radio]:checked:after{content:''; display:block; width:12px; height:12
.h_l a.logo{ display:block;width:121px; height:25px; overflow:hidden; background:url(../images/logo.png) no-repeat; background-size:cover; margin:10px 0 0;padding:0;}
.h_r_text{ padding:5px 0; text-align:right; line-height:16px;}
.header .icon_back{margin-left:-15px;}
-.header a{color:#FFF; font-size:0.875rem;display: block;width: 3rem;}
+.header a{color:#FFF; font-size:0.875rem;display: block;}
.header a:active{color: #e3e3e3}
.box_insert{background:#FFF; border-bottom:#ddd solid 1px;padding:0 15px;}
@@ -267,15 +267,15 @@ input[type=radio]:checked:after{content:''; display:block; width:12px; height:12
.search_input{width:100%; border:0; font-size:0.9375rem; height:29px; padding:5px 0; line-height:20px;-webkit-appearance: none;-webkit-appearance:none; vertical-align:top; background:none; color:#FFF;}
.search_input::-webkit-input-placeholder {color:#fa8c13;}
-.station_list{}
+.station_list{ overflow:hidden;}
.station_list:after{ content: ''; display: block; overflow: hidden; visibility: hidden; clear: both}
-.station_list li{float:left; display:inline; width:33.333333%; font-size:1.0625rem; position:relative; border-bottom:#cacaca solid 1px;}
+.station_list li{float:left; display:inline; width:33.333333%; font-size:1.0625rem; position:relative; border-bottom:#cacaca solid 1px; margin-bottom:-1px;}
/*.station_list li:nth-last-child(1),
.station_list li:nth-last-child(2),
-.station_list li:nth-last-child(3){border-bottom:0;}*/
+.station_list li:nth-last-child(3){border-bottom:0;}
.box_insert .station_list li:nth-last-child(1),
.box_insert .station_list li:nth-last-child(2),
-.box_insert .station_list li:nth-last-child(3){border-bottom:0;}
+.box_insert .station_list li:nth-last-child(3){border-bottom:0;}*/
.station_list li:after{content:''; display:block; right:0; top:50%; -webkit-transform:translate3d(0,-50%,0); border-right: #cacaca solid 1px; height:.9em; position:absolute;}
.station_list li:nth-child(3n):after{ display:none;}
.station_list li a{display: block; line-height:2.617647058823529em; text-align:center; color:#787878;}
diff --git a/Mobile12306New/js/12306.js b/Mobile12306New/js/12306.js
index a748174..9e4d978 100644
--- a/Mobile12306New/js/12306.js
+++ b/Mobile12306New/js/12306.js
@@ -154,12 +154,21 @@ var cn12306 = {
});
},
loginOut: function(success, error) {
+ var loading = Public.showLoading('正在退出');
bootStrap.post('login/loginOut', 'html', null, 'login/init').done(function() {
+ loading.html('退出成功');
+ setTimeout(function(){
+ Public.hideLoading(loading);
+ },1000);
if (success) {
sessionStorage.clear();
success();
}
}).fail(function(e) {
+ loading.html('退出失败');
+ setTimeout(function(){
+ Public.hideLoading(loading);
+ },1000);
if (error) {
error(e);
}
diff --git a/Mobile12306New/js/check_station.js b/Mobile12306New/js/check_station.js
index 50cb5d5..f579055 100644
--- a/Mobile12306New/js/check_station.js
+++ b/Mobile12306New/js/check_station.js
@@ -77,22 +77,32 @@ var CheckStaion = {
CheckStaion.hotList = WIN["favorite_names"].substr(1).split('@');
},
- setHtml: function() {
- var html = '
';
+ getHisHmtl : function(){
var his = JSON.parse(localStorage.getItem('stationHis')),
- sp = [];
- if(!!his && his.length > 0){
- html += '
最近查找
'
- html += '
';
- html += '
';
-
- for (var i = 0; i < his.length; i++) {
- sp = his[i].split('|');
- html += '- '+sp[1]+'
';
- };
-
- html += '
';
+ sp = [],
+ html = '';
+ if(!his || his.length == 0){
+ return '';
}
+ html += '
'
+ html += '
';
+ html += '
';
+
+ for (var i = 0; i < his.length; i++) {
+ sp = his[i].split('|');
+ html += '- '+sp[1]+'
';
+ };
+
+ html += '
';
+ return html;
+ },
+ setHtml: function() {
+ var html = '
';
+
+
+ html += '
';
+ html += CheckStaion.getHisHmtl();
+ html += '
';
//
上海\
//
天津\
if (CheckStaion.hotList.length > 0) {
@@ -159,10 +169,17 @@ var CheckStaion = {
localStorage.setItem('stationHis',JSON.stringify(stationHis));
+ $('#station_hisbox').html(CheckStaion.getHisHmtl());
+
$('#station_suggest ul').html('');
$('#station_suggest').hide();
$('#station_search').val('');
});
+
+ $('[data-fn="remove_his"]').live('click',function(){
+ $('#station_hisbox').html('');
+ localStorage.removeItem('stationHis');
+ });
},
showSuggest: function(list) {
if (!list || list.length == 0) {
diff --git a/Mobile12306New/js/js.min.js b/Mobile12306New/js/js.min.js
index b93a197..69e8e2c 100644
--- a/Mobile12306New/js/js.min.js
+++ b/Mobile12306New/js/js.min.js
@@ -81,17 +81,18 @@ a:a.touches[0],k&&clearTimeout(k),k=null,f.x2=q.pageX,f.y2=q.pageY,p+=Math.abs(f
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={}),p=r=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").live("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)}}})},user:"",isLogin:!1,checkNum:0,checkLogin:function(a,b,c){Public.checkNum++;cn12306.isUserLogined(function(){Public.isLogin=!0;sessionStorage.getItem("user")?Public.user=sessionStorage.getItem("user"):localStorage.getItem("useraccount")&&(Public.user=JSON.parse(localStorage.getItem("useraccount")).username);Public.setHis();$("body").removeClass("nologin");$("#login_tip").hide();"function"==typeof a&&a()},function(){sessionStorage.clear();Public.isLogin=
-!1;$("body").addClass("nologin");$("#login_tip").show();"function"==typeof b&&b()},function(){Public.isLogin=!1;$("body").addClass("nologin");$("#login_tip").show();2>Public.checkNum?Public.checkLogin(a,b,c):c()})},his:{querys:[],queryObjs:{}},setHis:function(){Public.his.querys=Public.getHisQuery();for(var a=0,b=Public.his.querys.length;a
'+
-a+"");b=b||1500;$("body").append(c);setTimeout(function(){c.addClass("public_toast_show")},10);setTimeout(function(){c.removeClass("public_toast_show");c.on("webkitTransitionEnd",function(){c.remove()})},b)},popHtml:function(a,b){var c="",d=DOC.createElement("div"),e="";if("object"==typeof b)for(var f in b)e+='
'+b[f]+"";d.className="public_layer";c+='
'+a+"
"+(""==e?'
':
-'
'+e+"
")+"
";d.innerHTML=c;document.getElementsByTagName("body")[0].appendChild(d);setTimeout(function(){$(".public_pop",d).addClass("public_pop_show")},0);$(d).on("touchmove",function(a){a.preventDefault();return!1});return $(d)},alert:function(a,b){var c=Public.popHtml(a,{sure:"\u786e\u5b9a"});$(".public_btns a",c).on("click",function(){c.remove();"function"==typeof b&&b()})},showLoading:function(a){a=$('
");$("body").append(a);return a},hideLoading:function(a){a?a.remove():$(".loadingBox").remove()},confirm:function(a,b,c){var d=Public.popHtml(a,{cancel:"\u53d6\u6d88",sure:c||"\u786e\u5b9a"});$(".public_btns a",d).on("click",function(){var a=$(this).attr("data-val");d.remove();"function"==typeof b&&"sure"==a&&b()})},getQueryData:function(a){a=a.replace(/^\?+/,"").replace(/&/,"&");a=a.split("&");for(var b=a.length,c={};b--;)if(item=a[b].split("="),item[0]){var d=
-item[1]||"";try{d=decodeURIComponent(d)}catch(e){d=unescape(d)}c[decodeURIComponent(item[0])]=d}return c},objToQueryString:function(a){var b=[],c,d,e;for(c in a)if(d=a[c],d instanceof Array)for(e=d.length;e--;)b.push(c+"[]="+encodeURIComponent(d[e]));else b.push(c+(""===d?"":"="+encodeURIComponent(d)));return b.join("&")},hasArrObjKey:function(a,b,c){for(var d=-1,e=0,f=a.length;e
Public.calendar.maxDate.date.getTime()&&(Public.calendar.curDate=Public.calendar.maxDate,Public.calendar.checkCallback(Public.calendar.curDate)),Public.calendar.setBasic()):2==a&&(Public.calendar.maxDate=
-Public.calendar._TODAY.addDays(29),Public.calendar.setBasic())})},dateChangeCallback:function(a){var b=a.date.getTime();b>=Public.calendar.minDate.date.getTime()&&b<=Public.calendar.maxDate.date.getTime()?($("#date_tip").hide(),Public.hideInnerPage("date_box"),$("#start_date").html(Public.calendar.curDate.format(Public.formatString)+" "+Public.calendar.curDate.day(3)),$("#start_date_val").val(Public.calendar.curDate.format("yyyy-MM-dd"))):(b=$("a.cur",Public.calendar.wrap).offset(),$("#date_tip").css({left:b.left,
-top:b.top,display:"block"}).html(""+a.format("M\u6708d\u65e5")+'\u4e0d\u5728\u9884\u552e\u671f
\u9884\u7ea6\u63d0\u9192'),0.75b.left/window.innerWidth?$("#date_tip").attr("class","tip_small tip_left"):$("#date_tip").attr("class","tip_small"))}};var Util={isImageFile:function(a){a=a.substring(a.lastIndexOf("."),a.length).toLowerCase();return".bmp"==a||".png"==a||".jpg"==a||".gif"==a},isEmpty:function(a,b,c){if(!a[b]){with($("#"+b).addError())0=b)&&(null==c||a<=c)},convertNumberToString:function(a,b){a=""+a;for(var c=[],d=0;dPublic.checkNum?Public.checkLogin(a,b,c):c()})},his:{querys:[],queryObjs:{}},setHis:function(){Public.his.querys=Public.getHisQuery();for(var a=
+0,b=Public.his.querys.length;a'+a+" ");b=b||1500;$("body").append(c);setTimeout(function(){c.addClass("public_toast_show")},10);setTimeout(function(){c.removeClass("public_toast_show");c.on("webkitTransitionEnd",function(){c.remove()})},b)},popHtml:function(a,b){var c="",d=DOC.createElement("div"),e="";if("object"==typeof b)for(var f in b)e+=
+'