Quellcode durchsuchen

采美百科上测试

喻文俊 vor 3 Jahren
Ursprung
Commit
0afedb8145

+ 1 - 1
src/main/resources/static/css/encyclopedia/common.css

@@ -1,6 +1,6 @@
 @charset "UTF-8";
 @media screen and (min-width:768px){
-::-webkit-scrollbar{width:4px;background-color:#f5f5f5}
+::-webkit-scrollbar{width:8px;height: 8px; background-color:#f5f5f5}
 ::-webkit-scrollbar-thumb{border-radius:10px;background-color:#999}
 .icon{display:block;width:20px;height:20px;background-image:url(/img/encyclopedia/icon.png);background-repeat:no-repeat}
 .icon.arrowdown{background-position:-277px -413px}

+ 6 - 0
src/main/resources/static/js/encyclopedia/index.js

@@ -48,7 +48,13 @@ $(function () {
         //         floor.$floor.find('.more .icon').removeClass('arrowup');
         //     }
         // });
+        if($('.floor-list .floor .section').length < 6 ){
+            $('.more-btn').hide()
+        }
     } else {
+        if($('.floor-list .floor-title .h5-more-btn a').length < 6 ){
+            $('.more-btn').hide()
+        }
         // 移动端
         offset = getScrollOffset(['.navbar', '.category']);
         stickyResponse('#category', getScrollOffset('.banner'), function (e) {

+ 2 - 2
src/main/resources/templates/encyclopedia/instrument.html

@@ -39,7 +39,7 @@
         <div class="floor-title">
             <h2 th:text="${floor.name}"></h2>
             <div class="h5-more-btn">
-                <a th:href="'more-' + ${floor.typeId} + '-1-12.html'" th:if="${floorStat.size >= 6}">
+                <a th:href="'more-' + ${floor.typeId} + '-1-12.html'">
                     <span>更多</span>
                     <i class="icon arrowright"></i>
                 </a>
@@ -74,7 +74,7 @@
             </section>
         </article>
         <!-- 更多 -->
-        <div class="more" th:if="${floorStat.size >= 6}">
+        <div class="more">
             <a th:href="'more-' + ${floor.typeId} + '-1-12.html'">
                 <div class="more-btn">
                     <span class="">查看更多</span>

+ 3 - 3
src/main/resources/templates/encyclopedia/product.html

@@ -35,11 +35,11 @@
 </div>
 <!-- 分类楼层 -->
 <div class="floor-list">
-    <div class="floor" th:each="floor,floorStat : ${typeData}">
+    <div class="floor" th:each="floor : ${typeData}">
         <div class="floor-title">
             <h2 th:text="${floor?.name}"></h2>
             <div class="h5-more-btn">
-                <a th:href="'more-' + ${floor.typeId} + '-1-12.html'" th:if="${floorStat.size >= 6}">
+                <a th:href="'more-' + ${floor.typeId} + '-1-12.html'">
                     <span>更多</span>
                     <i class="icon arrowright"></i>
                 </a>
@@ -74,7 +74,7 @@
             </section>
         </article>
         <!-- 查看更多 -->
-        <div class="more" th:if="${floorStat.size >= 6}">
+        <div class="more">
             <a th:href="'more-' + ${floor.typeId} + '-1-12.html'">
                 <div class="more-btn">
                     <span class="">查看更多</span>