Selaa lähdekoodia

采美百科bug修改

yuwenjun1997 2 vuotta sitten
vanhempi
commit
70384aaaed

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

@@ -36,7 +36,7 @@ body{padding-top:80px;}
 .copyright p .icp{display:inline-block;vertical-align:middle}
 .copyright p a{color:#f1f1f1}
 .copyright p a:hover{color:#fff}
-.navigate{position:fixed;right:20px;top:50%;z-index:9;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:88px;background:#fff;-webkit-box-shadow:0px 4px 8px rgba(74,79,88,0.16);box-shadow:0px 4px 8px rgba(74,79,88,0.16)}
+.navigate{position:fixed;right:20px;top:50%;z-index:19;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:88px;background:#fff;-webkit-box-shadow:0px 4px 8px rgba(74,79,88,0.16);box-shadow:0px 4px 8px rgba(74,79,88,0.16)}
 .navigate li{line-height:40px;height:40px;text-align:center}
 .navigate li.active a{color:#e15616;background:#fef6f3}
 .navigate li a{display:block;font-size:12px;color:#4a4f58}

+ 3 - 1
src/main/resources/static/css/encyclopedia/detail.css

@@ -30,6 +30,7 @@ img{cursor: pointer;}
 /*.article .section.params .tr .th{background:#f4f5f8;width: 30%;}*/
 /*.article .section.params .tr .td{background:#ffffff;width: 70%; overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}*/
 .article .section.params .content{width:100%;font-size:14px;border-collapse:unset;border-spacing:unset}
+.article .section.params .content.mobile{display: none;}
 .article .section.params .content tr td{padding:8px;line-height:1.6;border-top:1px solid;border-left:1px solid;border-color:#e3e6eb !important}
 .article .section.params .content tr td:last-child{border-right:1px solid}
 .article .section.params .content tr:last-child td{border-bottom:1px solid}
@@ -82,7 +83,7 @@ img{cursor: pointer;}
 .article .section .recommend-section .content .tag-list{height:24px}
 .article .section .recommend-section .content .tag-list .tag{display:inline-block;height:24px;line-height:24px;background:#fef6f3;border-radius:2px;font-size:12px;color:#e15616;padding:0 8px;margin-right:8px}
 .article .section .recommend-section .content .dashed-line{margin-top:12px;height:0px;border-bottom:1px dashed #b8bfca}
-.article .section .recommend-section .content .footer{height:50px;line-height:50px;font-size:14px;color:#93979f}
+.article .section .recommend-section .content .footer{height:50px;line-height:50px;font-size:14px;color:#93979f;display: flex;justify-content: space-between;}
 
 .contact-popup{display: none; position:fixed;top: 50%;left: 50%;z-index: 99999; transform: translate(-50%,-50%); width:314px;height:418px;overflow:hidden;background:url(/img/encyclopedia/contact.png) no-repeat center}
 .contact-popup .close{position:absolute;display:block;width:30px;height:30px;text-align:center;line-height:30px;top:10px;right:20px;font-size:28px;color:#2c3038;cursor:pointer}
@@ -124,6 +125,7 @@ body{padding-top:40.3vw}
 .article .section.description .names .alias{color:#93979f}
 .article .section.description .desc{text-align:justify;font-size:3.2vw;line-height:5.6vw;margin:3.2vw 0}
 .article .section.description .cover img{display:block;width:23.6vw;height:23.6vw;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px dashed #e3e6eb}
+.article .section.params .content.pc{display: none;}
 .article .section.params .tr{line-height:5.6vw}
 .article .section.params .tr .group{font-size:3.2vw;margin:1.6vw 0}
 .article .section.params .tr .group .th::after{content:":"}

+ 9 - 1
src/main/resources/static/js/encyclopedia/common.js

@@ -204,7 +204,7 @@ function pageScrollObserve(selector) {
         if (scrollFlag) return;
         var scrollTop = $(this).scrollTop();
 
-        var selectorEl = $(selector).eq(0);
+        var selectorEl = $(selector);
 
         if(selectorEl.length === 0){
             return;
@@ -212,6 +212,14 @@ function pageScrollObserve(selector) {
 
         if (scrollTop < selectorEl.eq(0).offset().top - offset) {
             callback(null, -1);
+            return
+        }
+
+        // console.log(scrollTop, selectorEl.last().offset().top - offset)
+
+        if(scrollTop > selectorEl.last().offset().top - offset){
+            callback(null, -1);
+            return
         }
 
         selectorEl.each(function (index, el) {

+ 4 - 6
src/main/resources/templates/encyclopedia/instrument-detail.html

@@ -114,7 +114,7 @@
             <h2>仪器档案</h2>
             <div class="line"></div>
         </div>
-        <table class="content">
+        <table class="content pc">
             <tr>
                 <td class="th">品牌</td>
                 <td class="td" th:text="*{brand}"></td>
@@ -136,8 +136,7 @@
                 </td>
             </tr>
         </table>
-        <!--
-        <div class="content">
+        <div class="content mobile">
             <div class="tr">
                 <div class="group">
                     <div class="th">品牌</div>
@@ -169,7 +168,6 @@
                 </div>
             </div>
         </div>
-        -->
     </section>
     <!-- 仪器认证 -->
     <section class="section approve" th:unless="*{#arrays.isEmpty(authImageList)}">
@@ -244,7 +242,7 @@
 
     <!-- 日期 && 浏览量 -->
     <section class="section publish-info">
-        <div class="publish-date"><span>日   期:</span><span>2021-10-27 17:23</span></div>
+        <div class="publish-date"><span>日   期:</span><span th:text="*{#dates.format(publishTime, 'yyyy-MM-dd HH:mm')}"></span></div>
         <div class="review"><span>浏览量:</span><span th:text="*{pv}"></span></div>
     </section>
 
@@ -291,7 +289,7 @@
                     </div>
                     <div class="dashed-line"></div>
                     <footer class="footer">
-                        <time>日期:<span th:text="${recommend.publishTime}"></span></time>
+                        <time>日期:<span th:text="${#dates.format(recommend.publishTime, 'yyyy-MM-dd HH:mm:ss') }"></span></time>
                         <span>浏览量:<span th:text="${recommend.pv lt 10000 ? recommend.pv : '9999+'}"></span></span>
                     </footer>
                 </div>

+ 4 - 4
src/main/resources/templates/encyclopedia/product-detail.html

@@ -100,7 +100,7 @@
             <h2>产品档案</h2>
             <div class="line"></div>
         </div>
-        <table class="content" th:if="${isPC}">
+        <table class="content pc">
             <tr>
                 <td class="th">品牌</td>
                 <td class="td" th:text="*{brand}"></td>
@@ -122,7 +122,7 @@
                 </td>
             </tr>
         </table>
-        <div class="content" th:unless="${isPC}">
+        <div class="content mobile">
             <div class="tr">
                 <div class="group">
                     <div class="th">品牌</div>
@@ -225,7 +225,7 @@
 
     <!-- 日期 && 浏览量 -->
     <section class="section publish-info">
-        <div class="publish-date"><span>日   期:</span><span>2021-10-27 17:23</span></div>
+        <div class="publish-date"><span>日   期:</span><span th:text="*{#dates.format(publishTime, 'yyyy-MM-dd HH:mm')}"></span></div>
         <div class="review"><span>浏览量:</span><span th:text="*{pv}"></span></div>
     </section>
 
@@ -272,7 +272,7 @@
                     </div>
                     <div class="dashed-line"></div>
                     <footer class="footer">
-                        <time>日期:<span th:text="${recommend.publishTime}"></span></time>
+                        <time>日期:<span th:text="${#dates.format(recommend.publishTime, 'yyyy-MM-dd HH:mm:ss') }"></span></time>
                         <span>浏览量:<span th:text="${recommend.pv lt 10000 ? recommend.pv : '9999+'}"></span></span>
                     </footer>
                 </div>