From 8bb323f3f50850594168d7fd2aec5b9fc1ca61af Mon Sep 17 00:00:00 2001
From: jsasg <735273025@qq.com>
Date: Wed, 2 Jul 2025 14:44:35 +0800
Subject: [PATCH] =?UTF-8?q?pref:=20pc=20=E4=BA=A7=E5=93=81=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E8=A1=A8=E5=8D=95=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/index/view/pc/product/detail.html | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/app/index/view/pc/product/detail.html b/app/index/view/pc/product/detail.html
index 38cbe4b4..aee6899a 100644
--- a/app/index/view/pc/product/detail.html
+++ b/app/index/view/pc/product/detail.html
@@ -225,7 +225,7 @@
-
+
@@ -273,21 +273,12 @@
// 处理表单提交
modal.find("form").submit(function(e) {
e.preventDefault();
+ var form = $(this)
var formData = $(this).serialize();
- // 这里可以添加代码将formData发送到服务器
- // 例如通过AJAX
- console.log("提交的数据: " + formData);
- // 提交成功后可以选择关闭模态框
- modal.hide();
- });
-
- // 提交询盘
- $('#send').click(function() {
- var form = $(this).parents('form');
$.ajax({
url: "{:url('product/inquiry')}",
type: 'POST',
- data: form.serialize(),
+ data: formData,
success: function(r) {
if (r.code == 0) {
form[0].reset(); // 重置表单
@@ -297,6 +288,7 @@
},
error: function(e) {
console.error(e);
+ modal.hide();
}
})
});