From 4c2a624adfa117c6705bf35c4da47c8f53d33d41 Mon Sep 17 00:00:00 2001 From: peijunlei Date: Thu, 3 Sep 2026 09:05:14 +0800 Subject: [PATCH] =?UTF-8?q?refactor(contact-form):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E7=9A=84js=E8=84=9A=E6=9C=AC=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/themes/dist_static/static/js/common.js | 50 +++++++++++++-------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/public/themes/dist_static/static/js/common.js b/public/themes/dist_static/static/js/common.js index 768507f..8d498df 100644 --- a/public/themes/dist_static/static/js/common.js +++ b/public/themes/dist_static/static/js/common.js @@ -102,31 +102,31 @@ $(function() { $item.attr("data-expanded", !isExpanded); $(this).attr("aria-expanded", !isExpanded); }); - $(".section-contact-form").on("submit", function(e) { - e.preventDefault(); - const $form = $(this); - const $name = $form.find("[name=\"name\"]"); - const $phone = $form.find("[name=\"phone\"]"); - const name = $.trim($name.val()); - const phone = $.trim($phone.val()); - const agreed = $form.find("[name=\"agree\"]").is(":checked"); - if (!name) { - alert("请输入姓名"); - $name.focus(); - return; - } - if (!phone) { - alert("请输入联系方式"); - $phone.focus(); - return; - } - if (!agreed) { - alert("请阅读并同意隐私政策"); - return; - } - alert("提交成功,我们将尽快与您联系"); - $form[0].reset(); - }); + // $(".section-contact-form").on("submit", function(e) { + // e.preventDefault(); + // const $form = $(this); + // const $name = $form.find("[name=\"name\"]"); + // const $phone = $form.find("[name=\"phone\"]"); + // const name = $.trim($name.val()); + // const phone = $.trim($phone.val()); + // const agreed = $form.find("[name=\"agree\"]").is(":checked"); + // if (!name) { + // alert("请输入姓名"); + // $name.focus(); + // return; + // } + // if (!phone) { + // alert("请输入联系方式"); + // $phone.focus(); + // return; + // } + // if (!agreed) { + // alert("请阅读并同意隐私政策"); + // return; + // } + // alert("提交成功,我们将尽快与您联系"); + // $form[0].reset(); + // }); $("#nav-mega-product").on("mouseenter", "[data-mega-cat]", function() { const $mega = $("#nav-mega-product"); const cat = $(this).attr("data-mega-cat");