zhengjinyi 1 år sedan
förälder
incheckning
a64f5117d7

+ 1 - 0
src/main/resources/static/css/product/detail.pc.css

@@ -7,6 +7,7 @@ li{list-style:none;}
 .productShopBox a:hover{ color: #333333;}
 .productShopBox .shop-item{ display: flex;flex: 1;flex-direction: row;align-items: center; }
 .productShopBox .shopBox-logo{ width: 60px;height: 60px;border-radius: 30px;overflow: hidden;margin-right: 12px;background:rgba(0,0,0,0.02);}
+.productShopBox .shopBox-logo img{ width: 60px;height: 60px;border-radius: 30px;}
 .productShopBox .shopBox-content{ display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-webkit-flex-direction: column;-moz-box-orient: vertical;-moz-box-direction: normal;flex-direction: column }
 .productShopBox .shopBox-name{ font-weight: 600;font-size: 16px;line-height: 24px;color: #11192d;margin-right: 16px;}
 .productShopBox .shopBox-tit{ font-size: 14px;}

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

@@ -246,6 +246,10 @@ var productDetail = new Vue({
                             $('html, body').animate({ scrollTop: $('.tabTit').offset().top - $('#globalHead').height() - 50 });
                         }, 1000);
                     }
+                    setTimeout(function(){
+                        // 图片懒加载
+                        $("img[data-original]").lazyload();
+                    },500);
                 } else {
                     console.log('<===Error===>',response.msg)
                 }

+ 1 - 1
src/main/resources/templates/product/detail.html

@@ -26,7 +26,7 @@
         <div class="productShopBox" v-if="isPC">
             <a th:href="@{'/supplier-'+ ${product.shopId} +'.html'}" class="shop-item">
                 <div class="shopBox-logo">
-                    <img th:src="${product.shopLogo}" th:alt="${product.shopTitle}">
+                    <img src="/img/base/placeholder.png" th:data-original="${product.shopLogo}" th:alt="${product.shopTitle}">
                 </div>
                 <div class="shopBox-content">
                     <div class="shopBox-title">