From 5425ce63cf0756fb35d5d8e2e78d04bb32a3df95 Mon Sep 17 00:00:00 2001
From: SilenceLeo
Date: Thu, 4 Sep 2014 22:34:02 +0800
Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E6=9C=9F=E7=AD=89=E7=AD=89bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Mobile12306New/js/date.js | 7 ++++++-
Mobile12306New/js/js.min.js | 26 +++++++++++++-------------
Mobile12306New/js/login.js | 10 +++++-----
Mobile12306New/js/no_complete.js | 2 +-
Mobile12306New/js/prdersubmit.js | 2 +-
Mobile12306New/js/remind.js | 2 +-
6 files changed, 27 insertions(+), 22 deletions(-)
diff --git a/Mobile12306New/js/date.js b/Mobile12306New/js/date.js
index c05cfcc..4f20bff 100644
--- a/Mobile12306New/js/date.js
+++ b/Mobile12306New/js/date.js
@@ -125,6 +125,7 @@ DateComponent.prototype.bindDomEvent = function() {
var max = _self.maxDate.date.getTime();
if($(this).hasClass('disable')){
+ $('#date_tip').hide();
return false;
}
@@ -159,6 +160,7 @@ DateComponent.prototype.bindDomEvent = function() {
} else {
_self.monthNext();
}
+ $('#date_tip').hide();
});
};
@@ -199,6 +201,7 @@ DateComponent.prototype.monthPrev = function() {
this.pageCurDate = y;
this.setBasic();
+ return true;
}
DateComponent.prototype.monthNext = function() {
@@ -210,11 +213,13 @@ DateComponent.prototype.monthNext = function() {
this.pageCurDate = new Date(this.pageCurDate.getFullYear(), this.pageCurMonth, 1, 0, 0, 0);
}
this.setBasic();
+
+ return true;
}
DateComponent.prototype.dayPrev = function() {
var date = new Date(this.curDate.getTime() - 86400000);
- if (date.date.getTime() < this._TODAY.date.getTime()) {
+ if (date.date.getTime() < this.minDate.date.getTime()) {
return this.curDate;
}
this.curDate = date;
diff --git a/Mobile12306New/js/js.min.js b/Mobile12306New/js/js.min.js
index d7d6d86..00634cd 100644
--- a/Mobile12306New/js/js.min.js
+++ b/Mobile12306New/js/js.min.js
@@ -128,12 +128,12 @@ b.date.getTime()?" cur":"",isCheckClass:m,lunar:(new LunarCalendar(b)).getMOD()}
b.date.getTime()?" cur":"",isCheckClass:m,lunar:(new LunarCalendar(b)).getMOD()}),b=new Date(b.getTime()+864E5),d=b.date.getTime();a=c;b=new Date((new Date(this.pageCurDate.getFullYear(),this.pageCurDate.getMonth(),1,0,0,0)).getTime()-864E5);for(d=b.date.getTime();0g?" remind":"",d>l&&(m=" disable"),e.unshift({year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate(),format:b.format("yyyy/MM/dd"),time:b.date.getTime(),"class":b.isToday?
" today"+(this.curDate.date.getTime()==b.date.getTime()?" cur":""):this.curDate.date.getTime()==b.date.getTime()?" cur":"",isCheckClass:m,lunar:(new LunarCalendar(b)).getMOD()}),b=new Date(b.getTime()-864E5),d=b.date.getTime();this.arr=e};
DateComponent.prototype.setHtml=function(){for(var a=''+this.fd+'
\u65e5 | \u4e00 | \u4e8c | \u4e09 | \u56db | \u4e94 | \u516d |
---|
',b=0,c=this.arr.length;b"),a+=this.tdHtml.temp(this.arr[b]);this.wrap.html(a+"
");this.bindDomEvent()};
-DateComponent.prototype.bindDomEvent=function(){var a=this;$("table a",a.wrap).on("click",function(b){b=new Date(parseInt($(this).attr("data-time")));a.minDate.date.getTime();a.maxDate.date.getTime();if($(this).hasClass("disable"))return!1;if(!$(this).hasClass("cur")){if(b.getTime()this.maxDate.date.getTime())return this.curDate;this.curDate=a;this.pageCurMonth=a.getMonth();this.pageCurDate=new Date(a.getFullYear(),this.pageCurMonth,1,0,0,0);this.setBasic()};
DateComponent.prototype.monthPrev=function(){var a=this.pageCurMonth-1,b;0>a?(a=11,b=new Date(this.pageCurDate.getFullYear()-1,a,1,0,0,0)):b=new Date(this.pageCurDate.getFullYear(),a,1,0,0,0);if(b.getTime()<(new Date(this._TODAY.getFullYear(),this._TODAY.getMonth(),1,0,0,0)).getTime())return!1;this.pageCurMonth=a;this.pageCurDate=b;this.setBasic()};
DateComponent.prototype.monthNext=function(){this.pageCurMonth++;11this.maxDate.date.getTime())return this.curDate;this.curDate=a;this.pageCurDate=new Date(this.curDate.getFullYear(),this.curDate.getMonth(),1,0,0,0);this.pageCurMonth=this.pageCurDate.getMonth();this.setBasic();return this.curDate};DateComponent.prototype.setSection=function(a,b){this.minDate=a;this.maxDate=this.minDate.addDays(b)};
DateComponent.prototype.setMinDay=function(a){this.minDate=a};DateComponent.prototype.setMaxDay=function(a){this.maxDate=a};var CheckStaion={runing:!1,objs:{a:[],b:[],c:[],d:[],e:[],f:[],g:[],h:[],i:[],j:[],k:[],l:[],m:[],n:[],o:[],p:[],q:[],r:[],s:[],t:[],u:[],v:[],w:[],x:[],y:[],z:[]},objsZh:{},hotList:[],zhObj:{},CodeObj:{},callback:null,init:function(){if(CheckStaion.runing)return!1;CheckStaion.runing=!0;CheckStaion.formatStation();CheckStaion.setHtml();CheckStaion.bindEvent()},formated:!1,formatStation:function(){if(!CheckStaion.formated){CheckStaion.formated=!0;CheckStaion.names=WIN.station_names.substr(1);CheckStaion.stationList=
CheckStaion.names.split("@");for(var a="",b=[],c=0;cparseInt(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").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);Public.toast("\u767b\u5f55\u6210\u529f!");setTimeout(function(){Login.loginRoute()},1E3)})):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,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';
@@ -232,15 +232,15 @@ _json_att:OrderSubmit.submitData._json_att},"leftTicket/init").done(function(a){
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("\u60a8\u8fd8\u6709\u672a\u5904\u7406\u7684\u8ba2\u5355")?Public.alert('\u60a8\u8fd8\u6709\u672a\u5904\u7406\u7684\u8ba2\u5355\uff0c\u8bf7\u60a8\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(){$("#user_menu").toggle();$("#user_menu").height(document.documentElement.clientHeight-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();
+-1!=a.indexOf("\u60a8\u8fd8\u6709\u672a\u5904\u7406\u7684\u8ba2\u5355")?Public.confirm('\u60a8\u8fd8\u6709\u672a\u5904\u7406\u7684\u8ba2\u5355\uff0c\u8bf7\u60a8\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(){$("#user_menu").toggle();$("#user_menu").height(document.documentElement.clientHeight-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.data.orderCacheDTO.message.message+"
";b+="";$("#orders").html(b)}}else 0<$("#no_complete_page").length&&(2>NoComplete.loadNum?(Public.showLoading("\u6b63\u5728\u83b7\u53d6\u8ba2\u5355\u4fe1\u606f"),setTimeout(function(){NoComplete.getOrder()},5E3)):Public.alert("\u6682\u65e0\u8ba2\u5355\uff0c\u8bf7\u5230\u6211\u7684\u8ba2\u5355\u67e5\u770b\u5df2\u5b8c\u6210\u8ba2\u5355",
function(){location.href="order_list.html"}))}).fail(function(a,b){0<$("#no_complete_page").length&&(Public.hideLoading(),Public.alert("\u67e5\u8be2\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5\u3002",function(){location.href=location.href}))})},getToken:function(){bootStrap.post("queryOrder/initNoComplete","html",null,"payOrder/init").done(function(a){a.match(/\S+\s+globalRepeatSubmitToken\s+=\s+\S+/);eval(a.match(/\S+\s+globalRepeatSubmitToken\s+=\s+\S+/)[0]);globalRepeatSubmitToken&&(NoComplete.token=globalRepeatSubmitToken);
NoComplete.getOrder()}).fail(function(){Public.hideLoading();Public.alert("12306\u4e0d\u7ed9\u529b\u554a\uff0c\u5509\u3002\u51fa\u73b0\u7f51\u7edc\u9519\u8bef\u4e86\uff0c\u8bf7\u91cd\u8bd5..")})},setHtml:function(a){for(var b="",c=0,d=0,e=a.length;d\u8ba2\u5355\u53f7\uff1a'+a[d].sequence_no+"";b+='';c=(new Date(a[d].tickets[0].pay_limit_time.replace(/\-/gi,"/"))).getTime();isNaN(c)||(c=(new Date(a[d].order_date.replace(/\-/gi,
-"/"))).getTime()+27E5);for(var f=0;f
',b+='K2341'+(new Date(a[d].start_train_date_page.replace(/\-/gi,"/"))).format("yyyy-M-d")+" "+(new Date(a[d].start_train_date_page.replace(/\-/gi,"/"))).day(3)+"
",b+='',b+='
'+a[d].from_station_name_page[0]+""+a[d].start_time_page+"
",b+='
'+a[d].to_station_name_page[0]+
-""+a[d].arrive_time_page+"
",b+="
",b+='',b+=''+a[d].tickets[f].passengerDTO.passenger_name+"",b+=''+a[d].tickets[f].passengerDTO.passenger_id_no+"",b+="
",b+=''+a[d].tickets[f].str_ticket_price_page+"\u5143",b+=a[d].tickets[f].ticket_type_name,b+=" "+a[d].tickets[f].seat_type_name,b+=" "+a[d].tickets[f].coach_name+"\u8f66",
-b+=a[d].tickets[f].seat_name,b+="
",b+=" ";b+="";b+='';b+='
\u5e2d\u4f4d\u5df2\u6210\u529f\u9501\u5b9a\uff0c\u8bf7\u60a8\u5728\u5185\u8fdb\u884c\u7f51\u4e0a\u652f\u4ed8\uff0c\u5426\u5219\u5e2d\u4f4d\u5c06\u81ea\u52a8\u91ca\u653e\u7ed9\u5176\u4ed6\u65c5\u5ba2\u3002
';b+='
',b+=''+a[d].train_code_page+""+(new Date(a[d].start_train_date_page.replace(/\-/gi,"/"))).format("yyyy-M-d")+" "+(new Date(a[d].start_train_date_page.replace(/\-/gi,"/"))).day(3)+"
",b+='',b+='
'+a[d].from_station_name_page[0]+""+a[d].start_time_page+"
",b+='
'+
+a[d].to_station_name_page[0]+""+a[d].arrive_time_page+"
",b+="
",b+='',b+=''+a[d].tickets[f].passengerDTO.passenger_name+"",b+=''+a[d].tickets[f].passengerDTO.passenger_id_no+"",b+="
",b+=''+a[d].tickets[f].str_ticket_price_page+"\u5143",b+=a[d].tickets[f].ticket_type_name,b+=" "+a[d].tickets[f].seat_type_name,b+=" "+a[d].tickets[f].coach_name+
+"\u8f66",b+=a[d].tickets[f].seat_name,b+="
",b+=" ";b+="
";b+='';b+='
\u5e2d\u4f4d\u5df2\u6210\u529f\u9501\u5b9a\uff0c\u8bf7\u60a8\u5728\u5185\u8fdb\u884c\u7f51\u4e0a\u652f\u4ed8\uff0c\u5426\u5219\u5e2d\u4f4d\u5c06\u81ea\u52a8\u91ca\u653e\u7ed9\u5176\u4ed6\u65c5\u5ba2\u3002
';b+='
";b+="
"}$("#orders").html(b);NoComplete.countdown()},countdown:function(){$("[data-limittime]").each(function(a,b){var c=$(b),d=c.attr("data-orderno"),e=(new Date(parseInt(c.attr("data-limittime")))).getTime()-(new Date).getTime();0>=e?(c.closest("p").html("\u8ba2\u5355\u5df2\u8fc7\u671f"),$('[data-no="'+d+'"').html("\u8ba2\u5355\u5df2\u8fc7\u671f").addClass("btn_gray")):
(c.html(NoComplete.gm(e)),$(".pay_tip_info .text_warning").html(NoComplete.gm(e)))});setTimeout(NoComplete.countdown,1E3)},gm:function(a){var b=parseInt(a/6E4);a=parseInt(a%6E4/1E3);10>b&&(b="0"+b);10>a&&(a="0"+a);return b+":"+a},selectBank:function(){Public.showInnerPage("banks")},pay:function(a,b){var c={sequence_no:NoComplete.curNo,pay_flag:"pay",_json_att:"",REPEAT_SUBMIT_TOKEN:NoComplete.token};$("span",NoComplete.payLoading).html("\u6b63\u5728\u83b7\u53d6\u652f\u4ed8\u4fe1\u606f");bootStrap.post("queryOrder/continuePayNoCompleteMyOrder",
"json",c,"queryOrder/initNoComplete").done(function(a){a.status&&("Y"==a.data.existError?Public.alert(a.data.errorMsg):bootStrap.post("payOrder/paycheck","json",{_json_att:""},"payOrder/init").done(function(a){NoComplete.submitPay(a.data.payForm)}).fail(function(){Public.alert("12306\u4e0d\u7ed9\u529b\u554a\uff0c\u5509\u3002\u51fa\u73b0\u7f51\u7edc\u9519\u8bef\u4e86\uff0c\u8bf7\u91cd\u8bd5..")}))}).fail(function(){Public.alert("12306\u4e0d\u7ed9\u529b\u554a\uff0c\u5509\u3002\u51fa\u73b0\u7f51\u7edc\u9519\u8bef\u4e86\uff0c\u8bf7\u91cd\u8bd5..")})},
diff --git a/Mobile12306New/js/login.js b/Mobile12306New/js/login.js
index 4a704cd..110ecdf 100644
--- a/Mobile12306New/js/login.js
+++ b/Mobile12306New/js/login.js
@@ -49,12 +49,12 @@ var Login = {
cn12306.isUserLogined(function() {
sessionStorage.setItem("user", Login.formData['username']);
- Public.toast("登录成功!");
+ // Public.toast("登录成功!");
- setTimeout(function() {
- // 登录成功 跳转
- Login.loginRoute();
- }, 1000);
+ // setTimeout(function() {
+ // // 登录成功 跳转
+ // Login.loginRoute();
+ // }, 1000);
});
} else {
diff --git a/Mobile12306New/js/no_complete.js b/Mobile12306New/js/no_complete.js
index 98f3003..51b5126 100644
--- a/Mobile12306New/js/no_complete.js
+++ b/Mobile12306New/js/no_complete.js
@@ -136,7 +136,7 @@ var NoComplete = {
}
for (var j = 0; j < list[i]['tickets'].length; j++) {
html += '';
- html += '
K2341' + (new Date(list[i]['start_train_date_page'].replace(/\-/gi, '/'))).format('yyyy-M-d') + ' ' + (new Date(list[i]['start_train_date_page'].replace(/\-/gi, '/'))).day(3) + '
';
+ html += '
' + list[i]['train_code_page'] + '' + (new Date(list[i]['start_train_date_page'].replace(/\-/gi, '/'))).format('yyyy-M-d') + ' ' + (new Date(list[i]['start_train_date_page'].replace(/\-/gi, '/'))).day(3) + '
';
html += '
';
html += '
' + list[i]['from_station_name_page'][0] + '' + list[i]['start_time_page'] + '
';
html += '
' + list[i]['to_station_name_page'][0] + '' + list[i]['arrive_time_page'] + '
';
diff --git a/Mobile12306New/js/prdersubmit.js b/Mobile12306New/js/prdersubmit.js
index 4adaff3..692ac4f 100644
--- a/Mobile12306New/js/prdersubmit.js
+++ b/Mobile12306New/js/prdersubmit.js
@@ -559,7 +559,7 @@ var OrderSubmit = {
errorCallback: function(tipText) {
Public.hideLoading(OrderSubmit.loading);
if (tipText.indexOf('您还有未处理的订单') != -1) {
- Public.alert('您还有未处理的订单,请您到
[未完成订单]进行处理!', function() {
+ Public.confirm('您还有未处理的订单,请您到
[未完成订单]进行处理!', function() {
window.location.href = 'no_complete_order.html';
});
} else {
diff --git a/Mobile12306New/js/remind.js b/Mobile12306New/js/remind.js
index e7a84af..ca55d50 100644
--- a/Mobile12306New/js/remind.js
+++ b/Mobile12306New/js/remind.js
@@ -16,7 +16,7 @@ var Remind = {
window.history.back();
});
return ;
- }
+ }
$('#menu_btn').on('click', function() {
$('#user_menu').toggle();