From f4c78da7f37055f058a9f11b6c0dc4b3a79bd889 Mon Sep 17 00:00:00 2001 From: peijunlei Date: Mon, 7 Sep 2026 09:33:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(contact):=20=E6=B7=BB=E5=8A=A0=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E6=8F=90=E4=BA=A4=E6=88=90=E5=8A=9F=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=92=8C=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/themes/website/1/zh/demo/contact.html | 55 ++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/public/themes/website/1/zh/demo/contact.html b/public/themes/website/1/zh/demo/contact.html index 7430c8b..5f6b302 100644 --- a/public/themes/website/1/zh/demo/contact.html +++ b/public/themes/website/1/zh/demo/contact.html @@ -230,6 +230,7 @@ $(function () { success: function (res) { if (res.code === 0 || res.code === 200) { $form[0].reset(); + showFormToast('提交成功,我们会尽快与您联系!'); } else { alert(res.msg || '提交失败,请稍后重试'); } @@ -245,8 +246,62 @@ $(function () { return false; }); + + // 表单提交成功提示 + var $toast = null; + var toastTimer = null; + function showFormToast(msg) { + if (!$toast) { + $toast = $( + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + ); + $('body').append($toast); + } + $toast.find('.form-toast__text').text(msg); + $toast.addClass('form-toast--show'); + clearTimeout(toastTimer); + toastTimer = setTimeout(function () { + $toast.removeClass('form-toast--show'); + }, 3000); + } }); +