部分逻辑更改

This commit is contained in:
iFish 2014-09-10 21:49:46 +08:00
parent 76e9d8ad97
commit 403e5d0585
21 changed files with 298 additions and 198 deletions

View File

@ -234,8 +234,8 @@
<h1>今日可预定 <span id="presellTip"></span> 的车票</h1>
<p class="special notLoginTip" style="display:none;color:red;">订票助手需要您登录12306才可使用。为了您更可靠的订票建议您立刻登录。</p>
<p class="special preSellTip">网上和电话订票提前20天代售点和车站提前18天以公告为准 [<a href="http://www.fishlee.net/soft/44/faq1.html" style="color:blue;" target="_blank">订票必读</a>]</p>
<div class="special unvalid" style="color:red;font-weight:bold;">
12306经常会卡死甚至死机这不是浏览器和软件的问题。建议多开几个窗口或小号模式
<div class="special unvalid" style="color:red;">
<a id="lnkGoAdv" href="#" style="color:red;font-weight:bold;text-decoration:underline;font-size: 140%;">猎豹抢票党(订票助手)已推出新版,点此立刻体验</a> ~
</div>
<div id="loginFunc" class="special loginPageOnly" style="display:none;">
<strong>选择账号</strong>

View File

@ -1385,6 +1385,18 @@ if (NONINFOBARMODE) {
document.write('<div id="iframewrapper"><iframe src="' + url + '" frameborder="0" height="100%" width="100%"></iframe></div>');
};
//切换到新版本
(function() {
$("#lnkGoAdv").click(function() {
chrome.tabs.getSelected(function(tab) {
chrome.tabs.update(tab.id, {
url: "http://12306.liebao.cn/"
});
});
});
})();
$(function () {
message.addAction("isReady", function (r) {
r({ ready: true });

View File

@ -56,7 +56,7 @@
"description": "12306订票助手 v7: 帮您订票的小助手 by 木鱼,全力为您的车票购买献计献策!",
"key": "7k6gnXVACvUPU2DfslJgSrWJTHqIg5uwd+Kgl/5zSg==",
"name": "猎豹抢票党/12306订票助手 V7",
"version": "7.0.1",
"version": "7.1.1",
"manifest_version": 2,
"icons": {
"16": "icons/icon_16.png",

View File

@ -52,7 +52,8 @@
margin-top: -1px;
}
#selltime_tip li:nth-child(1) {
#selltime_tip li:nth-child(1),
#selltime_tip li:nth-child(4) {
color: #ef7007;
}

View File

@ -18,7 +18,7 @@
top: 35px;
left: 0;
right: 0;
bottom: 210px;
bottom: 160px;
overflow-y: auto;
}
@ -108,7 +108,7 @@
bottom: 0;
right: 0;
left: 0;
height: 200px;
height: 150px;
background: #ffffff;
}

View File

@ -52,5 +52,6 @@
@media(max-width:1730px) {
.wrap.chat-on {
margin-right: 365px;
margin-left: 0;
}
}

View File

@ -71,158 +71,167 @@
float: right;
}
#swDnsSpeeding {
float: right;
display: none;
margin: 0 10px;
}
#swDnsSpeeding {
float: right;
display: none;
margin: 0 10px;
}
.search-tips-container {
background: #f8f8f8;
border: 1px solid #bdbdbd;
border-radius: 4px;
padding: 10px 10px 10px 10px;
z-index: 10;
.search-tips-container {
background: #f8f8f8;
border: 1px solid #bdbdbd;
border-radius: 4px;
padding: 10px 10px 10px 10px;
z-index: 10;
position: absolute;
color: #666;
font-size: 12px;
right: 100px;
top: 0;
width: 300px;
box-shadow: 5px 5px 10px rgba(110, 110, 110, 0.4);
display: none;
min-height: 40px;
text-align: left;
}
.search-tips-container > div {
margin-top: 10px;
line-height: 160%;
}
.search-tips-container > header:nth-child(n+2) {
margin-top: 20px;
}
.search-tips-container:before,
.search-tips-container:after {
position: absolute;
color: #666;
font-size: 12px;
right: 100px;
top: 0;
width: 300px;
box-shadow: 5px 5px 10px rgba(110, 110, 110, 0.4);
display: none;
min-height: 40px;
text-align: left;
content: '';
height: 0;
width: 0;
border-left: 5px solid #bdbdbd;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
right: -5px;
top: 20px;
}
.search-tips-container:before,
.search-tips-container:after {
position: absolute;
content: '';
height: 0;
width: 0;
border-left: 5px solid #bdbdbd;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
right: -5px;
top: 20px;
}
.search-tips-container:after {
border-left-color: #f8f8f8;
right: -4px;
}
.search-tips-container header {
font-weight: bold;
color: #9b540b;
line-height: 100%;
}
.search-tips-container header .fr {
color: #999999;
cursor: pointer;
}
.search-tips-container header .fr:hover {
color: #ff3e43;
}
.search-box .search-form-wrap {
margin: 5px 0 0 34px;
.search-tips-container:after {
border-left-color: #f8f8f8;
right: -4px;
}
.search-box .search-form {
overflow: hidden;
.search-tips-container header {
font-weight: bold;
color: #9b540b;
line-height: 100%;
}
.search-box .search-form li {
float: left;
}
.search-box .search-form-city,
.search-box .search-form-date {
width: 102px;
height: 37px;
padding: 0 30px 0 10px;
background: url(../../images/css-sprite.png) no-repeat;
border: none;
-webkit-appearance: none;
background-position: -24px -72px;
}
.search-box .search-form-city:focus,
.search-box .search-form-date:focus {
background-position: -203px -72px;
}
.search-box .search-form-date {
background-position: -24px -117px;
}
.search-box .search-form-date:focus {
background-position: -203px -117px;
}
.search-box .transfer-city {
margin: 0 6px;
}
.search-box .transfer-city .transfer-city-btn {
width: 39px;
height: 39px;
background: url(../../images/css-sprite.png) no-repeat;
background-position: -24px -158px;
.search-tips-container header .fr {
color: #999999;
cursor: pointer;
}
.search-box .transfer-city .transfer-city-btn:hover {
background-position: -73px -158px;
.search-tips-container header .fr:hover {
color: #ff3e43;
}
.search-box .transfer-city .transfer-city-btn:active {
background-position: -123px -158px;
}
.search-box .search-form-wrap {
margin: 5px 0 0 34px;
}
.search-box .select-date {
margin: 0 10px 0 10px;
.search-box .search-form {
overflow: hidden;
}
.search-box .search-form li {
float: left;
}
.search-box .submit-btn {
width: 133px;
height: 38px;
display: block;
line-height: 38px;
color: #fff;
font-size: 17px;
.search-box .search-form-city,
.search-box .search-form-date {
width: 102px;
height: 37px;
padding: 0 30px 0 10px;
background: url(../../images/css-sprite.png) no-repeat;
border: none;
-webkit-appearance: none;
background-position: -24px -72px;
}
.search-box .search-form-city:focus,
.search-box .search-form-date:focus {
background-position: -203px -72px;
}
.search-box .search-form-date {
background-position: -24px -117px;
}
.search-box .search-form-date:focus {
background-position: -203px -117px;
}
.search-box .transfer-city {
margin: 0 6px;
}
.search-box .transfer-city .transfer-city-btn {
width: 39px;
height: 39px;
background: url(../../images/css-sprite.png) no-repeat;
background-position: -24px -158px;
cursor: pointer;
border: 1px solid #2c961a;
border-radius: 4px;
-webkit-appearance: none;
background: linear-gradient(to bottom, #3bc412, #33a810);
}
.search-box .submit-btn:hover {
border-color: #176f0a;
background: linear-gradient(to bottom, #33cd19, #3b9d2a);
.search-box .transfer-city .transfer-city-btn:hover {
background-position: -73px -158px;
}
.search-box .submit-btn:active {
border-color: #176f0a;
background: linear-gradient(to bottom, #41b12f, #1f8a0c);
.search-box .transfer-city .transfer-city-btn:active {
background-position: -123px -158px;
}
.search-box .identity label {
display: block;
line-height: 20px;
margin-right: 15px;
color: #984d00;
.search-box .select-date {
margin: 0 10px 0 10px;
}
.search-box .submit-btn {
width: 133px;
height: 38px;
display: block;
line-height: 38px;
color: #fff;
font-size: 17px;
cursor: pointer;
border: 1px solid #2c961a;
border-radius: 4px;
-webkit-appearance: none;
background: linear-gradient(to bottom, #3bc412, #33a810);
}
.search-box .submit-btn:hover {
border-color: #176f0a;
background: linear-gradient(to bottom, #33cd19, #3b9d2a);
}
.search-box .identity label input {
position: relative;
top: -1px;
}
.search-box .submit-btn:active {
border-color: #176f0a;
background: linear-gradient(to bottom, #41b12f, #1f8a0c);
}
.search-box .identity label {
display: block;
line-height: 20px;
margin-right: 15px;
color: #984d00;
}
.search-box .identity label input {
position: relative;
top: -1px;
}
.search-more-option:link {
border-top: 1px solid#e9e8e2;

View File

@ -117,8 +117,7 @@
}
.result .ticket-block:hover {
border-color: #d9d8d8;
background: linear-gradient(to bottom, #ffffff, #fefefe 5%, #f5f5f5);
background: linear-gradient(to bottom,#FFFEFD,#F5E3D3);
}
.result td .ticket-block-selected:hover {
@ -168,16 +167,17 @@
margin-left: 20px;
}
.result .train-autotip {
line-height: 50px;
color: #bbb;
text-align: center;
font-weight: bold;
}
.result .train-autotip td{
border-top: 1px solid #cccccc;
.result .train-autotip {
line-height: 50px;
color: #bbb;
text-align: center;
font-weight: bold;
}
.result .train-autotip td {
border-top: 1px solid #cccccc;
}
/*购票建议*/
#suggestion {
display: none;

View File

@ -54,23 +54,30 @@
</nav>
</header>
<section id="selltime_tip">
<ul>
<script id="selltime_tip_tpl" type="text/x-dottemplate">
<li>
<p><span></span></p>
<p>车票起售时间</p>
</li>
<li>
<p>高铁</p>
<p>高铁</p>
<time>下午2:00</time>
</li>
<li>
<p>动车/城铁</p>
<p>动车/城铁</p>
<time>上午11:00</time>
</li>
<li>
<p>其它车次:</p>
<time></time>
<p>其它车次</p>
</li>
{{~it:v:i}}
{{if(!v)continue;}}
<li>
<p>{{=v.name}}</p>
<time>{{=v.time}}</time>
</li>
{{~}}
</script>
<ul>
</ul>
</section>
<article>
@ -977,9 +984,9 @@
<em></em>
{{~it.target:t:i}}
{{?t.username}}
<a href="javascript:;" class="chat-item-at" data-un="{{!t.username}}">{{!t.realname}}</a>
&nbsp;<a href="javascript:;" class="chat-item-at" data-un="{{!t.username}}">{{!t.realname}}</a>&nbsp;
{{??}}
<strong></strong>
<strong>&nbsp;&nbsp;</strong>
{{?}}
{{~}}
<em></em>

View File

@ -205,7 +205,7 @@
autoRefreshDelay: 5,
hideNotInListTrain: false,
hideNoTicket: false,
autoWaitToSell: true,
autoWaitToSell: false,
selectSeatFirst: true,
tryBottomSeat: true,
autoSubmitEnabled: true,

View File

@ -131,7 +131,7 @@
} else {
page += "?";
}
page += "bv=" + document.body.dataset["browserVersion"] + "&ev=" + document.body.dataset["targetExtensionVersion"];
page += "bv=" + (document.body.dataset["browserVersion"]||"") + "&ev=" + (document.body.dataset["targetExtensionVersion"]||"");
//加入百度统计
window._hmt = window._hmt || [];
_hmt.push(['_setAutoPageview', false]);
@ -156,7 +156,7 @@
//完成!
start.resolve();
};
var timeout = 3000;
var timeout = 5000;
var waitForStart = function () {
if (document.body.dataset["mobileSupportInitialized"]) {
@ -172,23 +172,23 @@
}
};
var extJson = null;
if (window.external.GetExtensionInfoListJson && (extJson = window.external.GetExtensionInfoListJson())) {
var ext = _.findWhere(JSON.parse(extJson), { id: "gkbheeokbgmmnbjhhlphckobccejghjn" });
if (ext) {
if (!ext.enabled)
start.reject("disabled");
else {
timeout = 10000;
waitForStart();
}
} else {
waitForStart();
}
} else {
waitForStart();
}
//var extJson = null;
//if (window.external.GetExtensionInfoListJson && (extJson = window.external.GetExtensionInfoListJson())) {
// var ext = _.findWhere(JSON.parse(extJson), { id: "gkbheeokbgmmnbjhhlphckobccejghjn" });
// if (ext) {
// if (!ext.enabled)
// start.reject("disabled");
// else {
// timeout = 10000;
// waitForStart();
// }
// } else {
// waitForStart();
// }
//} else {
// waitForStart();
//}
waitForStart();
});
})(window, document);

View File

@ -12,6 +12,46 @@
exports.citynameMap = _.mapObject(exports.cities, function (c) {
return c.n;
});
exports.findSimilarStation = function (name) {
var extractname = null;
//查找最接近的站点
_.each(exports.citynameMap, function (c) {
if ((c.n.indexOf(name) === 0 || name.indexOf(c.n) === 0) && (extractname === null || extractname.length > c.n.length))
extractname = c.n;
});
if (!extractname)
return [name];
var result = [];
_.each(exports.citynameMap, function (c) {
if (c.n.indexOf(extractname) === 0)
result.push(c.n);
});
return result;
};
exports.findSimilarStationInfos = function (name) {
var extractname = null;
//查找最接近的站点
_.each(exports.citynameMap, function (c) {
if ((c.n.indexOf(name) === 0 || name.indexOf(c.n) === 0) && (extractname === null || extractname.length > c.n.length))
extractname = c.n;
});
if (!extractname) {
var code = exports.citynameMap[name];
return code ? [{ code: code.c, name: name }] : [];
}
var result = [];
_.each(exports.citynameMap, function (c) {
if (c.n.indexOf(extractname) === 0)
result.push({ code: c.c, name: c.n });
});
return result;
};
exports.identityCardTypes = {
};
@ -195,4 +235,5 @@
});
}
});
});

View File

@ -158,24 +158,27 @@
"leftTicketDTO.to_station": to,
"purpose_codes": student ? "0X00" : "ADULT"
};
exports.log(p);
ajax.sendGet(queryTicketUrl, "leftTicket/init", p, "json", function () {
//url changed?
if (!this.model.status && this.model.c_url) {
queryTicketUrl = this.model.c_url;
sendQueryRequest();
} else if (!this.model.status) {
var error = (this.modal.messages || ["查询失败"]).join("");
def.reject(error);
} else {
var data = transferData(date, this.model, noProcess, noAction);
def.resolveWith(data);
}
}, function () {
def.reject();
def.reject("网络错误");
});
};
var fetchTicketUrl = function () {
ajax.sendGet("leftTicket/init", "/otn/", null, "text")
.done(function () {
var html = this.model;
var r = /(CLeftTicketUrl|isSaveQueryLog)\s*=\s*['"]([^'"]+)['"]/gi;
var m;
while (m = r.exec(html)) {
@ -186,11 +189,11 @@
}
if (!queryTicketUrl) {
document.dispatchEvent(new CustomEvent("platformError"));
def.reject();
def.reject("未能初始化查询地址");
}
else sendQueryRequest();
}).fail(function () {
def.reject();
def.reject("网络错误");
});
};
if (queryTicketUrl) {

View File

@ -68,7 +68,7 @@
//百度统计
if (window._hmt && type !== param.trackTypes.OPEN_PAGE_INDEX && type !== param.trackTypes.JOIN_CHAT && type !== param.trackTypes.EXIT_CHAT) {
try {
window._hmt.push(['_trackEvent', '12306_' + type]);
window._hmt.push(['_trackEvent', '12306_' + type, 'actionreport', '', '']);
} catch (e) {
}

File diff suppressed because one or more lines are too long

View File

@ -127,6 +127,10 @@
data.timeStr = utility.formatDate(data.time, "hh:mm:ss");
}
data.self = data.from.username == sessMgr.current.username;
//咩哈哈哈哈
if (data.from.username === "iccfish" || data.from.username === "imfish")
data.from.realname = "木魚";
data.sys = data.from.username || false;
data.tome = false;
if (data.target && data.target.length) {
@ -170,7 +174,7 @@
var editor = page.find("section.chat-editor");
var sendBtn = editor.find(">footer>button.button-primary");
var editorArea = editor.find(".chat-editor-container");
var specChars ="(^.^)\n(;_;)\n(¬_¬)\n(u_u)\n♪(´ε`)\n♪(´▽`)\n*_*\n⊙⊙!\n(ーー;)\n(-_-)zz\n↖(^ω^)↗\n囧rz\n^_^\n`(*∩_∩*)\n ̄□ ̄\nO(∩_∩)O\n*^_^* \n^_^#\n(☆_☆)/~~\n→_→ \n( o )~zZ\n(^ω^) \n(ˇ^ˇ)\no(>_<)o ~~\n>_<#\n⊙▂⊙\n╰_╯\n`(*><*)\n(⊙o⊙)\no(╯□╰)o\n::>_<:: \n=_=\nT_T\no(>_<)o ~~\n(#)凸\n:-x\n{{{(>_< )}}} \n(╯-╰)/ \nY(^o^)Y~\nY(^o^)Y~\n($ _ $)\no(︶︿︶)o\n⊙△⊙\n~~~^o^~~~\n╮(╯_╰)╭\n^_^#\n`(*∩_∩*)\n(⊙_⊙;)\n>_<||| \n@_@\n(⊙⊙?)\n^_~ \n(ˉ(∞)ˉ) \n^(oo)^ \n(◦ \"̮ ◦)\nヽミ ´∀`ミノ< \nヽ゚Д゚丿\nヽ(●´ε`●) \nヽ(≧Д≦)\nヽ(^0^)\nヾ(@^▽^@) \nヽ(*´∀`)\nヾ ^_^♪\n━(゚∀゚)━!\n(^▽^)コ祝贺你\nლ(╹ε╹ლ) \nლ(╹◡╹ლ)\nლ(^o^ლ) \nΣ(゚д゚lll)\nΣ(゚д゚;)\nΣ(TωT)努力--\nσ(´┰`=)\nε=┌(;・∀・)┘\nε=(・д・`*)ハァ…\nY(・∀・)Y 蟹\nY(>_<、)Y\nw(^_ン\n=0=\nT(;_;)T\np(^^)q\no(TヘTo)\noo\nm(-_-m) \nm(__)m\n♪(´ε` )\n☆彡\n☆ミ\n☆⌒(>。≪)\n☆⌒(*-゜)v\n≡(  ´Д`)/≡=\n∑(O_O)\n∑(・∀・) コ坏了 !!\n<(ToT)>\n{[(-_-)(-_-)]}zzz\n(・o・)/!\n(◎o◎)\n(^o^)/了解!\n(つд⊂)伤心\n゚Θ゚ \n(T▽T)\n(T_T)/~~\n(o・・o)/~\n(๑╹ڡ╹)╭ ♡\n(・。・)\n(・(仝)・)\n(・(ェ)・)\n¬з¬\n(=゚Д゚=)\n(=-ω-)zzZZ乙乙\n(--〆)\n( ̄Д ̄)ノ\n(-_-メ) \n(^^♪\n(^。^)y\n-.。o○\n(^ _ ^)/~~\n(-。-)y-゜゜゜\n(*゚Д゚)つミ匚___\n(*°∀°)=3\n(ー_ー)!!\n ^ω^\n( ^∀^)".split('\n');
var specChars = "(^.^)\n(;_;)\n(¬_¬)\n(u_u)\n♪(´ε`)\n♪(´▽`)\n*_*\n⊙⊙!\n(ーー;)\n(-_-)zz\n↖(^ω^)↗\n囧rz\n^_^\n`(*∩_∩*)\n ̄□ ̄\nO(∩_∩)O\n*^_^* \n^_^#\n(☆_☆)/~~\n→_→ \n( o )~zZ\n(^ω^) \n(ˇ^ˇ)\no(>_<)o ~~\n>_<#\n⊙▂⊙\n╰_╯\n`(*><*)\n(⊙o⊙)\no(╯□╰)o\n::>_<:: \n=_=\nT_T\no(>_<)o ~~\n(#)凸\n:-x\n{{{(>_< )}}} \n(╯-╰)/ \nY(^o^)Y~\nY(^o^)Y~\n($ _ $)\no(︶︿︶)o\n⊙△⊙\n~~~^o^~~~\n╮(╯_╰)╭\n^_^#\n`(*∩_∩*)\n(⊙_⊙;)\n>_<||| \n@_@\n(⊙⊙?)\n^_~ \n(ˉ(∞)ˉ) \n^(oo)^ \n(◦ \"̮ ◦)\nヽミ ´∀`ミノ< \nヽ゚Д゚丿\nヽ(●´ε`●) \nヽ(≧Д≦)\nヽ(^0^)\nヾ(@^▽^@) \nヽ(*´∀`)\nヾ ^_^♪\n━(゚∀゚)━!\n(^▽^)コ祝贺你\nლ(╹ε╹ლ) \nლ(╹◡╹ლ)\nლ(^o^ლ) \nΣ(゚д゚lll)\nΣ(゚д゚;)\nΣ(TωT)努力--\nσ(´┰`=)\nε=┌(;・∀・)┘\nε=(・д・`*)ハァ…\nY(・∀・)Y 蟹\nY(>_<、)Y\nw(^_ン\n=0=\nT(;_;)T\np(^^)q\no(TヘTo)\noo\nm(-_-m) \nm(__)m\n♪(´ε` )\n☆彡\n☆ミ\n☆⌒(>。≪)\n☆⌒(*-゜)v\n≡(  ´Д`)/≡=\n∑(O_O)\n∑(・∀・) コ坏了 !!\n<(ToT)>\n{[(-_-)(-_-)]}zzz\n(・o・)/!\n(◎o◎)\n(^o^)/了解!\n(つд⊂)伤心\n゚Θ゚ \n(T▽T)\n(T_T)/~~\n(o・・o)/~\n(๑╹ڡ╹)╭ ♡\n(・。・)\n(・(仝)・)\n(・(ェ)・)\n¬з¬\n(=゚Д゚=)\n(=-ω-)zzZZ乙乙\n(--〆)\n( ̄Д ̄)ノ\n(-_-メ) \n(^^♪\n(^。^)y\n-.。o○\n(^ _ ^)/~~\n(-。-)y-゜゜゜\n(*゚Д゚)つミ匚___\n(*°∀°)=3\n(ー_ー)!!\n ^ω^\n( ^∀^)".split('\n');
var faceSelector = editor.find(">header>select");
var initEditor = function () {
@ -181,11 +185,11 @@
editor.find(".chat-editor-container").css("color", color);
var faceDom = faceSelector[0];
specChars.forEach(function(f) {
specChars.forEach(function (f) {
var x = new Option(f, f);
faceDom.options[faceDom.options.length] = x;
});
faceSelector.change(function() {
faceSelector.change(function () {
var v = faceSelector.val();
if (v) {
pasteHtml(v);
@ -199,7 +203,7 @@
sendBtn.prop("disabled", false);
}, param.chatSendMsgDelay);
};
var pasteHtml = function(html) {
var pasteHtml = function (html) {
editorArea.append(html);
var range = document.createRange();

View File

@ -156,16 +156,36 @@
p.toCode = this.dataset.code;
sessMgr.save();
});
var selltipTpl = $("#selltime_tip_tpl").doT();
var showSellTime = function () {
var v = this.dataset.code;
var vn = this.value;
var cnt = $("#selltime_tip");
if (!v) {
cnt.hide();
return;
}
cnt.find("li:first span:first").html(this.value);
cnt.find("li:last time:last").html(utility.format24hTo12h(stationData.sellTime[v]).join("<br />") || "----");
//查找其它近似站
var stations = param.findSimilarStationInfos(vn);
if (!stations || !stations.length) {
cnt.hide();
return;
}
var times = _.map(stations, function (s) {
var time = stationData.sellTime[s.code];
if (!time)
return null;
time = utility.format24hTo12h(time);
return time ? { name: s.name, time: time.join("<br />") } : null;
});
if (!times || !times.length) {
cnt.hide();
return;
}
cnt.find("ul").html(selltipTpl(times));
cnt.show();
};
$("#from_city").change(showSellTime);

View File

@ -52,6 +52,9 @@
renderUnreadNotice();
};
var closeNotice = function () {
if (!$("section.search-tips-container:visible").length)
return;
$("section.search-tips-container").fadeOut();
if (!savedNotice || !savedNotice.items) return;

View File

@ -83,8 +83,8 @@
__.renderResultList();
__.fireEvent("onloadsuccess", extArg);
}).fail(function () {
tip.setState("error", "查票失败...");
}).fail(function (msg) {
tip.setState("error", msg || "查票失败...");
tip.delayClose();
__.fireEvent("onloadfailed", extArg);
});

View File

@ -143,7 +143,7 @@
{
text: "刷新",
type: "default",
callback: function() {
callback: function () {
self.location.reload();
return false;
}
@ -153,21 +153,20 @@
btns.unshift({
text: "安装猎豹浏览器",
type: "primary",
callback: function() {
callback: function () {
window.open("http://dl.liebao.cn/coop/KSBrowser_12306.exe");
return false;
}
});
} else {
btns.unshift({
text: "安装扩展",
type: "primary",
callback: function() {
window.open("http://12306.fishlee.net/crx");
return false;
}
});
}
btns.unshift({
text: "安装扩展",
type: "primary",
callback: function () {
window.open("http://12306.fishlee.net/crx");
return false;
}
});
$.showModalDialog("您需要安装" + (isLb ? "" : "<u>猎豹浏览器</u>并") + "启用<u>最新版12306订票助手扩展</u>才可以使用极速版订票。请安装后刷新此页面。如果已安装,请检查是否不小心禁用了 :-(", {
image: "/images/cat.png",

File diff suppressed because one or more lines are too long