Explorar o código

修改二级列表、商品活动专题接口

zhengjinyi %!s(int64=4) %!d(string=hai) anos
pai
achega
88ec5c24e6

+ 7 - 7
src/main/resources/static/css/document/details.css

@@ -36,12 +36,12 @@ li{list-style:none}
     .document-list .list-item .list-item-top .icon:before{width: 24px;height: 24px;background-position: -148px 2px;}
     .document-list .list-item .list-item-top .icon.top:before{width: 24px;height: 24px;background-position: -178px 2px;}
     .document-list .list-item .list-item-top .main {width: 800px;height: 120px;float: left;}
-    .document-list .list-item .list-item-top .main h1{font-weight: normal;font-size: 20px;line-height: 40px;color: #E15616;text-align: left;white-space: normal;word-break: break-all;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;}
-    .document-list .list-item .list-item-top .main .p{display: flex;font-weight: normal;font-size: 16px;line-height: 34px;color: #666666;text-align: left;white-space: normal;word-break: break-all;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;}
-    .document-list .list-item .list-item-top .main .p .p-span{flex: 0.9;float: left;margin-right: 10px;}
+    .document-list .list-item .list-item-top .main h1{font-weight: normal;font-size: 20px;line-height: 40px;color: #E15616;text-align: left;white-space: normal;word-break: break-all;overflow: hidden;text-overflow: ellipsis;-webkit-box-orient: vertical;-webkit-line-clamp: 1;}
+    .document-list .list-item .list-item-top .main .p{display: flex;font-weight: normal;font-size: 16px;line-height: 34px;color: #666666;text-align: left;white-space: normal;word-break: break-all;overflow: hidden;text-overflow: ellipsis;-webkit-box-orient: vertical;-webkit-line-clamp: 1;}
+    .document-list .list-item .list-item-top .main .p .p-span{float: left;margin-right: 10px;}
     .document-list .list-item .list-item-top .main h1 span{margin-right: 5px;}
     .document-list .list-item .list-item-top .main .p span{margin-right: 5px;}
-    .document-list .list-item .list-item-top .main .p .name{width:49%;float: left;margin-right:10px;font-weight: normal;text-align: left;white-space: normal;word-break: break-all;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;}
+    .document-list .list-item .list-item-top .main .p .name{width:49%;float: left;margin-right:10px;font-weight: normal;text-align: left;white-space: normal;word-break: break-all;overflow: hidden;text-overflow: ellipsis;-webkit-box-orient: vertical;-webkit-line-clamp: 1;display: -webkit-box;}
     .document-list .list-item .list-item-top .main .p .more{color: #E15616;cursor: pointer;}
     .document-list .list-item .list-item-bot{width: 100%;min-height: 1185px;padding: 20px 0;border-top: 1px solid #F5F5F5;float: left;margin-bottom: 120px;}
     .document-list .list-item .list-item-bot .pdf-li{width: 100%;height: 30px;line-height: 30px;font-size: 14px;color: #999999;float: left;margin: 5px 0;}
@@ -90,10 +90,10 @@ li{list-style:none}
     .document-list .list-item .list-item-top .icon:before{width: 24px;height: 24px;background-position: -59vw 0;}
     .document-list .list-item .list-item-top .icon.top:before{width: 24px;height: 24px;background-position: -67vw 0;}
     .document-list .list-item .list-item-top .main {height: 20vw;float: left;width: 70vw;}
-    .document-list .list-item .list-item-top .main h1{font-weight: normal;font-size: 4vw;line-height: 6.5vw;color: #E15616;text-align: left;white-space: normal;word-break: break-all;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;}
-    .document-list .list-item .list-item-top .main .p{width: 100%;font-weight: normal;font-size: 3vw;line-height: 6.5vw;color: #666666;text-align: left;	white-space: normal;word-break: break-all;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;display: flex;}
+    .document-list .list-item .list-item-top .main h1{font-weight: normal;font-size: 4vw;line-height: 6.5vw;color: #E15616;text-align: left;white-space: normal;word-break: break-all;overflow: hidden;text-overflow: ellipsis;-webkit-box-orient: vertical;-webkit-line-clamp: 1;}
+    .document-list .list-item .list-item-top .main .p{width: 100%;font-weight: normal;font-size: 3vw;line-height: 6.5vw;color: #666666;text-align: left;	white-space: normal;word-break: break-all;overflow: hidden;text-overflow: ellipsis;-webkit-box-orient: vertical;-webkit-line-clamp: 1;display: flex;}
     .document-list .list-item .list-item-top .main .p .p-span{margin-right: 3vw;}
-    .document-list .list-item .list-item-top .main .p .name{ float: left; width: 48%;font-weight: normal;font-size: 3vw;line-height: 6.5vw;color: #666666;text-align: left;	white-space: normal;word-break: break-all;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;}
+    .document-list .list-item .list-item-top .main .p .name{ float: left; width: 48%;font-weight: normal;font-size: 3vw;line-height: 6.5vw;color: #666666;text-align: left;	white-space: normal;word-break: break-all;overflow: hidden;text-overflow: ellipsis;-webkit-box-orient: vertical;-webkit-line-clamp: 1;display: -webkit-box;}
     .document-list .list-item .list-item-top .main span{margin-right: 3vw;}
     .document-list .list-item .list-item-top .main .p .more{display: inline-block;float: right;margin-right: 0;color: #E15616;cursor: pointer;width: 15vw;height: 6.5vw;background-color: #FFF5F1;border-radius: 0.5vw;text-align: center;}
     .document-list .list-item .list-item-bot{width: 100%;min-height: 80vw;padding: 0;border-top: 1px solid #F5F5F5;float: left;box-sizing: border-box;}

+ 54 - 0
src/main/resources/static/js/document/base.js

@@ -0,0 +1,54 @@
+var spiServer = $("#spiServer").val();
+var isPC = ($(window).width()>768);
+/** 表单输入框校验 */
+function verifyHandle(obj){
+    if ($(obj).is(":hidden")) { return false; }
+    var v = $.trim($(obj).val()).replace(/\s+/g,"");
+    var reg = $(obj).attr("rule");
+    var errorTxt = $(obj).siblings('.errTips').attr("tips");
+    if ($.trim(v) === '') {
+        if ($(obj).attr("placeholder") && $(obj).attr("placeholder").indexOf("请输入")>=0) {
+            errorTxt = $(obj).attr("placeholder").split("请输入")[1]+'不能为空';
+        } else {
+            errorTxt = '不能为空';
+        }
+        setErrorTxt(obj, errorTxt);
+        return false;
+    }else if (typeof reg != "undefined") {
+        reg = new RegExp(reg);
+        if (!reg.test(v)) {
+            setErrorTxt(obj, errorTxt);
+            return false;
+        }
+    }
+    clearErrorTxt(obj);
+}
+function setErrorTxt(obj, txt) {
+    $(obj).parent().addClass("error").find('.checked').removeClass("show");
+    $(obj).siblings('.errTips').text(txt).addClass("show");
+}
+function clearErrorTxt(obj) {
+    $(obj).siblings('.errTips').removeClass("show");
+    $(obj).parent().removeClass("error").find('.checked').addClass("show");
+}
+// 提交时验证表单
+function verifyForm() {
+    $("[needverify]:visible").each(function (index, ele) {
+        if (!$(ele).siblings('.checked').hasClass("show")) {
+            verifyHandle(ele);
+        }
+    });
+    var len = $('.errTips.show:visible').length;
+    return (len === 0);
+}
+// 单个验证表单
+function verifyCheack(ele) {
+    if (!$(ele).siblings('.checked').hasClass("show")) {
+        verifyHandle(ele);
+    }
+    var len = $(ele).siblings('.errTips.show:visible').length;
+    return (len === 0);
+}
+
+
+

+ 4 - 1
src/main/resources/static/js/product/detail.js

@@ -75,7 +75,7 @@ var productDetail = new Vue({
                     if(product.productDetail.orderInfo!='' && product.productDetail.serviceInfo!=''){
                         _self.isServiceInfo = true;
                     }
-                    if(product.validFlag =='3' || product.stock == 0 ){
+                    if(product.validFlag =='3' ||  product.validFlag =='10' || product.stock == 0 ){
                         _self.isNoneDisabled = true;
                     }else{
                         _self.isNoneDisabled = false;
@@ -83,6 +83,9 @@ var productDetail = new Vue({
                     if(product.validFlag =='3'){
                         _self.disabledText = '下架'
                     }
+                    if(product.validFlag =='10'){
+                        _self.disabledText = '停售'
+                    }
                     if(product.stock == 0 && product.validFlag !='3'){
                         _self.disabledText = '售罄'
                     }

+ 1 - 1
src/main/resources/templates/components/document-link.html → src/main/resources/templates/document/components/document-link.html

@@ -7,4 +7,4 @@
 <script charset="utf-8" type="text/javascript" src="/lib/lazyload.js"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/common/locallhostAjax.service.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/utils.js(v=${version})}"></script>
-<script charset="utf-8" type="text/javascript" th:src="@{/js/base.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/document/base.js(v=${version})}"></script>

+ 1 - 1
src/main/resources/templates/document/details.html

@@ -56,7 +56,7 @@
     </div>
 </div>
 <!-- 引入底部 -->
-<template th:replace="components/document-link"></template>
+<template th:replace="document/components/document-link"></template>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/document.service.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/lib/js/pdf.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/lib/js/pdf.worker.js(v=${version})}"></script>

+ 1 - 1
src/main/resources/templates/document/list.html

@@ -62,7 +62,7 @@
     </div>
 </div>
 <!-- 引入底部 -->
-<template th:replace="components/document-link"></template>
+<template th:replace="document/components/document-link"></template>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/document.service.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/document/list.js(v=${version})}"></script>
 </body>

+ 1 - 1
src/main/resources/templates/document/login.html

@@ -92,7 +92,7 @@
     </div>
 </div>
 <!-- 引入底部 -->
-<template th:replace="components/document-link"></template>
+<template th:replace="document/components/document-link"></template>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/document.service.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/document/login.js(v=${version})}"></script>
 </body>

+ 1 - 1
src/main/resources/templates/document/more-content.html

@@ -60,7 +60,7 @@
     </div>
 </div>
 <!-- 引入底部 -->
-<template th:replace="components/document-link"></template>
+<template th:replace="document/components/document-link"></template>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/document.service.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/document/more-content.js(v=${version})}"></script>
 </body>

+ 1 - 1
src/main/resources/templates/document/pdfdetails.html

@@ -13,7 +13,7 @@
     <div class="media" id="pdfMedia"></div>
 </div>
 <!-- 引入底部 -->
-<template th:replace="components/document-link"></template>
+<template th:replace="document/components/document-link"></template>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/document.service.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/lib/js/pdf.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/lib/js/pdf.worker.js(v=${version})}"></script>