From 3941afa58a1511a4e0b10d793b788ded4e8cd56d Mon Sep 17 00:00:00 2001 From: iFish Date: Fri, 13 Jun 2014 19:52:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web12306/css/ui/widget-message-popup.css | 2 +- Web12306/js/ui/index.js | 4 ++++ Web12306/js/ui/widget_message_popup.js | 4 +++- Web12306/js/ui/widget_verifycode.js | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Web12306/css/ui/widget-message-popup.css b/Web12306/css/ui/widget-message-popup.css index 221e2be..88670c0 100644 --- a/Web12306/css/ui/widget-message-popup.css +++ b/Web12306/css/ui/widget-message-popup.css @@ -30,7 +30,7 @@ .message-popup-error .message-popup-inner { border-color: rgb(175, 94, 94); background: #FFF7F7; - color: rgb(175, 94, 94); + color: rgb(134, 77, 77); } .message-popup-ok { border-color: #DCF1DE; diff --git a/Web12306/js/ui/index.js b/Web12306/js/ui/index.js index 61d2a76..926e17f 100644 --- a/Web12306/js/ui/index.js +++ b/Web12306/js/ui/index.js @@ -43,6 +43,10 @@ sessMgr.on("userForcedOut", function() { mp.showMessagePopup("error", "您的登录出现了问题,请重新登录"); }); + $(".search-more-option").click(function() { + var div = $("div.options-param"); + div.is(":visible") ? (div.hide(), $(this).html("显示更多选项")) : (div.show(), $(this).html("隐藏更多选项")); + }); })(); diff --git a/Web12306/js/ui/widget_message_popup.js b/Web12306/js/ui/widget_message_popup.js index c957701..07581e3 100644 --- a/Web12306/js/ui/widget_message_popup.js +++ b/Web12306/js/ui/widget_message_popup.js @@ -107,5 +107,7 @@ document.addEventListener("requestSupportError", function () { exports.showMessagePopup("error", "无法执行网络请求,似乎没有安装12306订票助手哦。", { closeAfter: null }); }); - + document.addEventListener("verifyCodeLoadFailed", function() { + exports.showMessagePopup("error", "验证码加载失败,请点击验证码图片刷新哦。"); + }); }); diff --git a/Web12306/js/ui/widget_verifycode.js b/Web12306/js/ui/widget_verifycode.js index 934313f..900ded8 100644 --- a/Web12306/js/ui/widget_verifycode.js +++ b/Web12306/js/ui/widget_verifycode.js @@ -28,6 +28,7 @@ imageEle.css({ "background-image": "url(" + this.url + ")", "background-size": "100% 100%" }); }, function () { imageEle.css({ "background-image": "url(../../images/loading.gif", "background-size": "auto" }); + document.dispatchEvent(new CustomEvent("verifyCodeLoadFailed")); }); }; exports.refresh = function (target) {