📅  最后修改于: 2022-03-11 15:02:37.079000             🧑  作者: Mango
if ($.trim($("user_name_intend").val()).length != 0 &&
$.trim($("user_telephone_intend").val()).length != 0 &&
$.trim($("user_email_intend").val()).length != 0 &&
$.trim($("user_comment_intend").val()).length != 0) {
$.ajax({
url: "/makeOrder",
type: "POST",
data: {
quantity: 1,
min_quantity: 1,
max_quantity: 100,
name: $('#user_name_intend').val(),
telephone: $('#user_telephone_intend').val(),
email: $('#user_email_intend').val(),
comment: $('#user_comment_intend').val(),
product_id: {{ product_id }},
},
dataType: "json",
success: function (t) {
$("#intendformpost").submit();
},
});
} else {
alert("Kerakli maydonlar to'ldirilmagan")
}