diff --git a/src/main/webapp/views/product/antifake.jsp b/src/main/webapp/views/product/antifake.jsp index fbb03de..6a7d6e3 100644 --- a/src/main/webapp/views/product/antifake.jsp +++ b/src/main/webapp/views/product/antifake.jsp @@ -173,8 +173,8 @@ return false; } - if (size.split("*")[0] < 6 || size.split("*")[1] < 6) { - layer.msg('防伪标最小尺寸6*6cm!', {offset: ['300px', '300px']}, function () { + if (size.split("*")[0] < 0.6 || size.split("*")[1] < 0.6) { + layer.msg('防伪标最小尺寸0.6*0.6cm!', {offset: ['300px', '300px']}, function () { }); return false; } diff --git a/src/main/webapp/views/product/coaster.jsp b/src/main/webapp/views/product/coaster.jsp index f32bc0b..06be819 100644 --- a/src/main/webapp/views/product/coaster.jsp +++ b/src/main/webapp/views/product/coaster.jsp @@ -221,6 +221,7 @@ } form.render(); + getProductImage() }) form.on("radio(switch)", function (data) { @@ -247,6 +248,56 @@ } }); + function getProductImage(craft) { + + $("#carousel").empty(); + $("#remark").empty(); + let data = {proTypeValue: "杯垫"} + let remark = ""; + let html = ""; + let kindValue = $("input[name='kindValue']:checked").val(); + if (!!kindValue) { + if (kindValue == 4 || kindValue == 6) { + kindValue = "铜版纸"; + } + data.kindValue = kindValue; + } + $.ajax({ + url: "${pageContext.request.contextPath}/getImgs", + type: "GET", + data, + //dataType : "json", + success: function (result) { + for (let i = 0; i < result.length; i++) { + // 只留一个remark + remark = ""; + if (result[0].imgWidth < result[0].imgHeight) { + html += '
'; + } else { + html += '
'; + } + remark += '
' + result[0].remark + '
'; + } + $("#carousel").append(html); + // 如果没有说明,就不显示null + if (remark.indexOf("null") < 0) { + $("#remark").append(remark); + } + // 如果没有轮播图就隐藏 + if (result.length == 0) { + document.getElementById("test1").style.display = "none"; //隐藏 + } else { + document.getElementById("test1").style.display = "block"; //显示 + ins.reload({ + elem: '#test1', + width: result[0].imgWidth, //设置容器宽度 + height: result[0].imgHeight + }); + } + } + }); + }; + // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { diff --git a/src/main/webapp/views/product/coupon.jsp b/src/main/webapp/views/product/coupon.jsp index fb21029..4c4d4aa 100644 --- a/src/main/webapp/views/product/coupon.jsp +++ b/src/main/webapp/views/product/coupon.jsp @@ -819,9 +819,15 @@ success: function (result) { for (let i = 0; i < result.length; i++) { // 只留一个remark + remark = ""; html += '
'; + remark += '
' + result[i].remark + '
'; } $("#carousel").append(html); + if (remark.indexOf("null") < 0) { + remark_html = remark; + $("#remark").append(remark); + } // 如果没有轮播图就隐藏 if (result.length == 0) { document.getElementById("test1").style.display = "none"; //隐藏 diff --git a/src/main/webapp/views/product/cupSet.jsp b/src/main/webapp/views/product/cupSet.jsp index d8d794f..2d9b3da 100644 --- a/src/main/webapp/views/product/cupSet.jsp +++ b/src/main/webapp/views/product/cupSet.jsp @@ -120,8 +120,8 @@

- - + + <%-- --%>
@@ -370,7 +370,7 @@ for (let i = 0; i < result.length; i++) { // 只留一个remark remark = ""; - html += '
'; + html += '
'; remark += '
' + result[i].remark + '
'; } $("#carousel").append(html); diff --git a/src/main/webapp/views/product/poster.jsp b/src/main/webapp/views/product/poster.jsp index 11a68e6..f9864f1 100644 --- a/src/main/webapp/views/product/poster.jsp +++ b/src/main/webapp/views/product/poster.jsp @@ -340,8 +340,8 @@
印面: - - + +