function snackbar(n){var t=$('
'+n+"<\/div>");$(".snackbar").length<1?(t.appendTo($("body")),t.animate({top:50,opacity:1},600,function(){t.delay(1500).fadeOut(500,function(){$(this).remove()})})):($(".snackbar").not($(this)).remove(),t.appendTo($("body")),t.animate({top:50,opacity:1},600,function(){t.delay(1e3).fadeOut(500,function(){$(this).remove()})}))}function errorSnackbar(n){var t=$('
提示:'+n+"<\/div>");$(".snackbar").length<1?(t.appendTo($("body")),t.animate({top:50},600,function(){t.delay(3e3).fadeOut(500,function(){$(this).remove()})})):($(".snackbar").not($(this)).remove(),t.appendTo($("body")),t.animate({top:50},600,function(){t.delay(1e3).fadeOut(500,function(){$(this).remove()})}))}function settime(n,t){if(countdown==0)return $(n).html(t),$(n).removeAttr("disabled"),countdown=60,!1;$(n).attr("disabled","disabled");$(n).html("("+countdown+") ");countdown--;setTimeout(function(){settime(n,t)},1e3)}(function(n){n.fn.modal=function(t){function s(){if(n(".overlay").size()<=0)n("body").append("
<\/div>"),n(".overlay").fadeIn("fast")}function r(){n(".overlay").size()>0&&n(".overlay").fadeOut("fast",function(){n(this).remove()});n("body").css("overflow","auto")}var i=n(this),o=i.find(".icon-close"),u,f,e;if(typeof t=="string")switch(t){case"open":i.removeClass("modal-close").addClass("modal-open");s();break;case"close":i.removeClass("modal-open").addClass("modal-close");r()}o.on("click",function(n){n.preventDefault();i.removeClass("modal-open").addClass("modal-close");r()});if(n(".overlay").size()>0){u=n(".overlay");f=i.find(".modal-body");u.on("click",function(n){n.preventDefault();i.removeClass("modal-open").addClass("modal-close");r()});e=n(window).innerHeight()-i.find(".modal-header").height()-100;f.css({"max-height":e,"overflow-y":"auto"});n("body").css("overflow","hidden")}t=t||{}}})(jQuery);var countdown=60;document.onkeydown=function(n){var t=n||window.event||arguments.callee.caller.arguments[0];t&&t.keyCode==27&&console.log(123);t&&t.keyCode==113;t&&t.keyCode==13}