Ver código fonte

采美百科上测试

喻文俊 3 anos atrás
pai
commit
d04f2e9237

+ 4 - 3
src/main/resources/static/css/encyclopedia/index.css

@@ -29,11 +29,12 @@
 .floor .article .section:nth-child(3n){margin-right:0}
 .floor .article .section .cover{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;height:260px}
 .floor .article .section .cover img{width:246px;height:246px}
-.floor .article .section .content{padding:16px 16px 0;-webkit-box-sizing:border-box;box-sizing:border-box}
-.floor .article .section .content h3{-webkit-transition:all 0.4s;-o-transition:all 0.4s;transition:all 0.4s;font-weight:bold}
+.floor .article .section .content{padding:16px 16px 0;-webkit-box-sizing:border-box;box-sizing:border-box;}
+.floor .article .section .content h3{-webkit-transition:all 0.4s;-o-transition:all 0.4s;transition:all 0.4s;font-weight:bold;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;}
 .floor .article .section .content .title{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;height:52px;color:#4a4f58;margin-top:12px;line-height:26px;text-align:justify;word-break:break-all}
 .floor .article .section .content .question{margin:12px 0;height:78px}
 .floor .article .section .content .question p{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;color:#93979f;line-height:26px;font-size:14px}
+.floor .article .section .content .question p:nth-child(3)~p{display: none}
 .floor .article .section .content .tag-list{height:24px}
 .floor .article .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}
 .floor .article .section .content .dashed-line{margin-top:12px;height:0px;border-bottom:1px dashed #b8bfca}
@@ -77,7 +78,7 @@
 .floor .article .section .content .title{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-top:1.6vw;font-size:3.2vw;line-height:4.6vw;text-align:justify;height:9.2vw; word-break: break-all;}
 .floor .article .section .content .question{height:10vw;margin:2.4vw 0}
 .floor .article .section .content .question p{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;font-size:2.6vw;line-height:5vw;color:#93979f}
-.floor .article .section .content .question p:last-child{display:none}
+.floor .article .section .content .question p:nth-child(2)~p{display: none}
 .floor .article .section .content .tag-list{height:4.8vw;-ms-flex-wrap:wrap;flex-wrap:wrap}
 .floor .article .section .content .tag-list .tag{height:4.8vw;padding:0 1.2vw;margin-right:1.6vw;background:#fef6f3;border-radius:0.2vw;font-size:2.6vw;color:#e15616;line-height:4.8vw}
 .floor .article .section .content .tag-list .tag:last-child{display:none}

+ 1 - 1
src/main/resources/templates/encyclopedia/components/footer.html

@@ -8,7 +8,7 @@
             <span class="br">互联网药品信息服务资格证编号(粤)-非经营性-2021-0339</span>
             <span class="br">中华人民共和国增值电信业务经营许可证</span>
         </p>
-        <p>Copyright © 2015-2020 CAIMEI365.com All Rights Reserved 深圳市采美信息技术有限公司</p>
+        <p>Copyright © 2015-2020 CAIMEI365.com All Rights Reserved 深圳市采美网络信息有限公司</p>
     </div>
 </footer>
 <!-- 底部公共js -->

+ 6 - 3
src/main/resources/templates/encyclopedia/components/header.html

@@ -31,9 +31,12 @@
                 <span class="close-btn icon close"></span>
                 <span>热门搜索:</span>
                 <!--跳转方式:1仅搜索,2产品,3仪器,4链接-->
-                <th:block th:each="keyword,keywordStat: ${searchHotWord}">
-                    <a th:href="'search.html?keyword=' + ${keyword}" th:text="${keyword}" th:title="${keyword}"></a>
-                    <em th:if="${keywordStat.size gt 1}">/</em>
+                <th:block th:each="item,stat: ${searchHotWord}" th:object="${item}">
+                    <a th:href="*{'search.html?keyword=' + keyWord}" th:if="*{jumpType eq 1}" th:text="*{keyWord}"></a>
+                    <a th:href="*{'product-' + productId + '.html'}" th:if="*{jumpType eq 2}" th:text="*{keyWord}"></a>
+                    <a th:href="*{'instrument-' + productId + '.html'}" th:if="*{jumpType eq 3}" th:text="*{keyWord}"></a>
+                    <a th:href="*{jumpLink}" th:if="*{jumpType eq 4}" th:text="*{keyWord}"></a>
+                    <em th:if="${stat.size gt 1}">/</em>
                 </th:block>
             </div>
         </div>

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

@@ -35,7 +35,7 @@
 </div>
 <!-- 分类楼层 -->
 <div class="floor-list">
-    <div class="floor" th:each="floor : ${typeData}" th:id="${floor}">
+    <div class="floor" th:each="floor : ${typeData}">
         <div class="floor-title">
             <h2 th:text="${floor.name}"></h2>
             <div class="h5-more-btn">
@@ -67,7 +67,7 @@
                         <div class="dashed-line"></div>
                         <footer class="footer">
                             <time>日期:<span th:text="*{publishTime}"></span></time>
-                            <span>浏览量:<span th:text="*{pv}"></span></span>
+                            <span>浏览量:<span th:text="*{pv lt 1000 ? pv : '999+'}"></span></span>
                         </footer>
                     </div>
                 </a>

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

@@ -17,7 +17,7 @@
 <template th:replace="encyclopedia/components/header"></template>
 <!-- 分类楼层 -->
 <div class="floor container more-floor" id="moreFloor" th:object="${moreData}">
-    <div class="floor-title" th:id="${moreData}">
+    <div class="floor-title">
         <h2 v-text="*{typeName}"></h2>
         <img src="/img/encyclopedia/01.png" alt="中胚层产品"/>
     </div>
@@ -43,7 +43,7 @@
                     <div class="dashed-line"></div>
                     <footer class="footer">
                         <time>日期:<span th:text="${item.publishTime}"></span></time>
-                        <span>浏览量:<span th:text="${item.pv}"></span></span>
+                        <span>浏览量:<span th:text="${item.pv lt 1000 ? item.pv : '999+'}"></span></span>
                     </footer>
                 </div>
             </a>

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

@@ -67,7 +67,7 @@
                         <div class="dashed-line"></div>
                         <footer class="footer">
                             <time>日期:<span th:text="*{publishTime}"></span></time>
-                            <span>浏览量:<span th:text="*{pv}"></span></span>
+                            <span>浏览量:<span th:text="*{pv lt 1000 ? pv : '999+'}"></span></span>
                         </footer>
                     </div>
                 </a>

+ 2 - 2
src/main/resources/templates/index.html

@@ -106,11 +106,11 @@
                             </a>
                         </div>
                         <div class="right_item_main" th:each="info,stat : ${sideJson.get('baikeList')}" th:object="${info}">
-                            <a th:if="${stat.index}==0" th:href="*{commodityType eq 1 ? 'product-' + productId + '.html' : 'product-' + item.instrument + '.html'}" th:title="*{name}" class="item_banner" target="_blank" onclick="_czc.push(['_trackEvent','商城首页','热门百科','点击','','Um_Event_HomeBaikeTemplateClick'])">
+                            <a th:if="${stat.index}==0" th:href="*{link}" th:title="*{name}" class="item_banner" target="_blank" onclick="_czc.push(['_trackEvent','商城首页','热门百科','点击','','Um_Event_HomeBaikeTemplateClick'])">
                                 <img src="/img/base/placeholder.png" th:attr="data-original=*{image}" th:alt="*{name}">
                                 <div class="name" th:text="*{name}"></div>
                             </a>
-                            <a th:if="${stat.index}>0" th:href="*{commodityType eq 1 ? 'product-' + productId + '.html' : 'product-' + item.instrument + '.html'}" th:title="*{name}" class="item_text" target="_blank" onclick="_czc.push(['_trackEvent','商城首页','热门百科','点击','','Um_Event_HomeBaikeTemplateClick'])">
+                            <a th:if="${stat.index}>0" th:href="*{link}" th:title="*{name}" class="item_text" target="_blank" onclick="_czc.push(['_trackEvent','商城首页','热门百科','点击','','Um_Event_HomeBaikeTemplateClick'])">
                                 <p class="item_text_name info" th:text="*{name}"></p>
                                 <!-- <p class="item_text_time" v-if="isPC" th:text="*{createDate}"></p> -->
                             </a>