Explorar o código

采美百科页面接口调试

yuwenjun1997 %!s(int64=2) %!d(string=hai) anos
pai
achega
03b8239a76

+ 6 - 0
src/main/java/com/caimei/www/controller/unlimited/EncyclopediaController.java

@@ -105,6 +105,9 @@ public class EncyclopediaController extends BaseController {
     public String getEncyclopediaSearch(final Model model) {
         //热搜词
         List<BaikeHotSearch> hotSeracherWords=productService.getHotWords();
+        //分类集合
+        List<BaikeTypeVo> typeList = productService.geTypeList();
+        model.addAttribute("TypeList", typeList);
         model.addAttribute("hotSeracherWords", hotSeracherWords);
         return ENCYCLOPEDIA_SEARCH;
     }
@@ -116,6 +119,9 @@ public class EncyclopediaController extends BaseController {
     public String getEncyclopediaAbout(final Model model) {
         //热搜词
         List<BaikeHotSearch> hotSeracherWords=productService.getHotWords();
+        //分类集合
+        List<BaikeTypeVo> typeList = productService.geTypeList();
+        model.addAttribute("TypeList", typeList);
         model.addAttribute("hotSeracherWords", hotSeracherWords);
         return ENCYCLOPEDIA_ABOUT;
     }

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

@@ -27,7 +27,7 @@
                 <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}"></a>
+                        <a th:href="*{jumpLink}" th:if="*{jumpType eq 4}" th:text="*{keyWord}" target="_blank"></a>
                     </li>
                 </ul>
             </div>