/** * 琛ㄥ崟鎻愪氦 */ !function (win, $) { var dialog = win.YDUI.dialog; $(".weui-submit").on("click", function () { var $form = $("#Jform"); dialog.loading.open('姝e湪鎻愪氦..'); $.post($form.attr("action"), $form.serialize(), function (ret) { dialog.loading.close(); if (ret.status == 200) { dialog.toast(ret.msg, 'success', 1000, function () { if (ret.url) { window.location.href = ret.url; } }); } else { dialog.toast(ret.msg, 'none', 1000); } }, 'json'); }); }(window, jQuery);