Quellcode durchsuchen

采美文章新增预览功能

xiebaomin vor 2 Jahren
Ursprung
Commit
bf3b72ef7c

+ 8 - 0
src/main/java/com/caimei/www/controller/authorized/supplier/SupplierPageController.java

@@ -66,6 +66,8 @@ public class SupplierPageController extends BaseController {
     private static final String ARTICLE_LIST = "supplier-center/article/article-list";
     /** 供应商文章编辑页面 */
     private static final String ARTICLE_EDIT = "supplier-center/article/article-edit";
+    /** 供应商文章预览页面 */
+    private static final String ARTICLE_PREVIEW = "supplier-center/article/preview";
     /** 供应商采美百科商品资料列表页面 */
     // private static final String ENCYCLOPEDIA_PRODUCT_LIST = "supplier-center/encyclopedia/product-list";
     /** 供应商采美百科仪器资料列表页面 */
@@ -242,6 +244,12 @@ public class SupplierPageController extends BaseController {
         return ARTICLE_EDIT;
     }
 
+    /** 供应商文章预览页面 */
+    @GetMapping("/supplier/article/preview.html")
+    public String supplierArticlePreview() {
+        return ARTICLE_PREVIEW;
+    }
+
     /** 供应商采美百科词条列表页面 */
     @GetMapping("/supplier/encyclopedia/list.html")
     public String encyclopediaList(){

+ 1 - 1
src/main/resources/static/css/supplier-center/article/article-edit.css

@@ -20,7 +20,7 @@
 .valide-form{width:500px;margin:0 auto;margin-top:40px}
 .valide-form .el-form--label-top .el-form-item__label{  line-height: 0; padding: 16px 0}
 .valide-form .btns{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}
-.valide-form .btn{width:232px;height:50px;text-align:center;line-height:50px;font-size:18px;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer}
+.valide-form .btn{width:160px;height:50px;text-align:center;line-height:50px;font-size:18px;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer}
 .valide-form .btn.break{background:#FFE6DC;border:1px solid #E15616;border-radius:2px;color:#E15616}
 .valide-form .btn.submit{background:#E15616;color:#FFFFFF}
 

+ 30 - 0
src/main/resources/templates/article/components/article-preview.html

@@ -0,0 +1,30 @@
+<header class="header" xmlns:th="http://www.w3.org/1999/xhtml">
+  <!--导航栏-->
+  <div class="nav">
+    <div class="h5-head">
+      <a class="index" href="/"><img src="/img/info/mall.png">商城</a>
+      <a class="hotWord" href="javascript:void(0);">热搜词</a>
+    </div>
+    <div class="logo">
+      <a href="/" target="_blank"><img src="/img/info/nav-logo.png"/></a>
+    </div>
+    <div class="type">
+      <div>
+        <!-- <a class="home" href="/" target="_blank">商城</a> -->
+        <a th:each="type: *{articleType}" th:text="${type.name}" th:href="'/info/center-'+${type.id}+'-1.html'" th:class="${typeId==type.id}?'typeBtn current':'typeBtn'" th:typeId="${type.id}"></a>
+        <a class="typeBtn" href="#">美业科普</a>
+        <!-- <a class="typeBtn" href="/encyclopedia/product.html" target="_blank">采美百科</a> -->
+      </div>
+    </div>
+    <!--搜索-->
+    <div class="search auto-input" id="topSearch">
+      <input class="keyword" type="text" placeholder="请输入关键词" autocomplete="off" disabled />
+      <a class="searchBtn icon" href="#"></a>
+    </div>
+  </div>
+  <input type="hidden" th:value="${labelId}" id="labelId">
+  <input type="hidden" th:value="${typeId}" id="typeId">
+  <input type="hidden" th:value="${pageNum}" id="pageNum">
+  <input type="hidden" th:value="${coreServer}" id="coreServer">
+  <input type="hidden" th:value="${agent}" id="userAgent">
+</header>

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

@@ -58,7 +58,7 @@
                 <div class="search__content">
                     <div class="search__tip">为您找到相关文章<span v-text="listRecord"></span>条</div>
                     <div class="search__sort" id="searchSortControl">
-                        <div class="search__sort_current">文章排序</div>
+                        <div class="search__sort_current">综合排序</div>
                         <ul class="search__sort_select">
                             <li class="selected" data-type="1">综合排序</li>
                             <li data-type="2">时间排序</li>

+ 45 - 0
src/main/resources/templates/encyclopedia/components/previewHeader.html

@@ -0,0 +1,45 @@
+<header xmlns:th="https://www.thymeleaf.org">
+    <div class="bk-header">
+        <div class="bk-container">
+            <div class="bk-logo">
+                <a th:href="'/encyclopedia/list.html'" title="采美百科">
+                    <h1>采美百科</h1>
+                    <img src="/img/encyclopedia/assets/pc-logo.png" alt="采美百科" class="only-pc"/>
+                    <img src="/img/encyclopedia/assets/h5-logo.png" alt="采美百科" class="only-mobile"/>
+                </a>
+            </div>
+            <div class="only-mobile bk-menu">
+                <span class="bk-search-btn"></span>
+                <span class="bk-menu-name">菜单</span>
+                <span class="bk-collapse-btn"></span>
+            </div>
+            <div class="bk-search-container">
+                <div class="bk-search-menu only-mobile">
+                    <span class="bk-name">菜单</span>
+                    <span class="bk-search-close"></span>
+                </div>
+                <form method="" id="searchForm">
+                    <div class="bk-search-control">
+                        <label><input id="searchInput" type="text" disabled placeholder="搜索词条"/></label>
+                        <button type="submit">搜索</button>
+                    </div>
+                </form>
+                <ul class="bk-hot-keyword">
+                    <li th:each="item : ${hotSeracherWords}" th:object="${item}" th:if="${(item.jumpType eq 1) or (item.jumpType eq 4)}">
+                        <a th:href="'/encyclopedia/search.html?keyword=' + *{keyWord}" th:if="*{jumpType eq 1}" th:text="*{keyWord}"></a>
+                        <a th:href="*{jumpLink}" th:if="*{jumpType eq 4}" th:text="*{keyWord}" target="_blank"></a>
+                    </li>
+                </ul>
+            </div>
+        </div>
+    </div>
+    <div class="bk-nav">
+        <ul class="bk-navbar bk-container">
+            <li th:each="item,stat : ${TypeList}" th:object="${item}" th:if="${stat.index < 8}">
+                <a th:href="'/encyclopedia/list-' + *{typeId} + '.html'" th:text="*{name}"></a>
+            </li>
+            <li><a href="#">走进百科</a></li>
+        </ul>
+    </div>
+    <input type="hidden" th:value="${coreServer}" id="coreServer">
+</header>