/** * 提示框 * * @param string message * @param string type * @param string icon * @return void */ function toast(message, type, icon) { var toast = $(".toast"); toast.addClass(type); toast.children('.message').html(message); var iconClass = 'fa-' + icon; toast.children('.icon').addClass(iconClass); toast.fadeIn(500); setTimeout(function() { toast.fadeOut('fast'); toast.children('.message').text(''); toast.children('.icon').removeClass(iconClass); }, 3000); } /** * 获取url中参数 * @param variable * @returns {*} */ function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i