xiebaomin 1 年之前
父节点
当前提交
611cc4fb64

+ 72 - 31
src/main/java/com/caimei/www/controller/unlimited/ArticleController.java

@@ -7,6 +7,8 @@ import com.caimei.www.pojo.page.*;
 import com.caimei.www.service.page.ArticleService;
 import com.caimei.www.service.page.CmBrandLandingService;
 import com.caimei.www.service.page.ProductService;
+import com.caimei.www.utils.PaginationVo;
+import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -19,9 +21,8 @@ import org.springframework.web.bind.annotation.*;
 import org.springframework.web.server.ServerWebExchange;
 import org.thymeleaf.util.StringUtils;
 
-import java.lang.reflect.Array;
 import java.text.SimpleDateFormat;
-import java.util.Arrays;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
@@ -57,29 +58,30 @@ public class ArticleController extends BaseController {
      * 文章列表【旧center】
      */
     @GetMapping("/info/center-{id}-{pageNum}.html")
-    public String toArticleList(@PathVariable("id") Integer id, @PathVariable("pageNum") Integer pageNum, final Model model) {
+    public String toArticleList(@PathVariable("id") Integer id, @PathVariable("pageNum") Integer pageNum,
+            final Model model) {
         List<BaseLink> typeList = articleService.getArticleTypes();
         List<CmBrandLandingVO> cmBrandLandingList = cmBrandLandingService.getCmBrandLandingList(new CmBrandLanding()
                 .setType("4").setAuthorId(id.toString()));
-        List<ImageLink> infoSelected = articleService.getArticleSelected();
-        List<CmProductArchiveFile> archiveFiles = articleService.findArchiveFileAddTime();
+        List<ImageLink> infoSelected = articleService.getArticleSelected(0, 5);
+        List<CmProductArchiveFile> archiveFiles = articleService.findArchiveFileAddTime(0, 3);
         List<ProductList> productSellNumbers = productService.getProductSellNumbers();
         List<BaseLink> data = articleService.getArticleLabels().getData();
         List<ImageLink> Ads = articleService.getLastestInfoAds().getData();
         model.addAttribute("ads", Ads);
         model.addAttribute("labels", data);
-        model.addAttribute("articleType", typeList);//导航栏
-        model.addAttribute("articleImages", cmBrandLandingList);//导航栏图片
-        model.addAttribute("infoSelected", infoSelected);//精选文章
-        model.addAttribute("productSellNumbers", productSellNumbers);//销量前三商品
-        model.addAttribute("archiveFiles", archiveFiles);//最新美业资料top3
+        model.addAttribute("articleType", typeList);// 导航栏
+        model.addAttribute("articleImages", cmBrandLandingList);// 导航栏图片
+        model.addAttribute("infoSelected", infoSelected);// 精选文章
+        model.addAttribute("productSellNumbers", productSellNumbers);// 销量前三商品
+        model.addAttribute("archiveFiles", archiveFiles);// 最新美业资料top3
         model.addAttribute("typeId", id);
         model.addAttribute("labelId", 0);
         model.addAttribute("pageNum", pageNum);
         model.addAttribute("isSearch", true);
-//        System.out.println("archiveFiles" + archiveFiles);
-//        System.out.println("infoSelected" + infoSelected);
-        //model.addAttribute("pagePath", String.format("/info/center-%s-1.html", id));
+        // System.out.println("archiveFiles" + archiveFiles);
+        // System.out.println("infoSelected" + infoSelected);
+        // model.addAttribute("pagePath", String.format("/info/center-%s-1.html", id));
         return ARTICLE_LIST_PATH;
     }
 
@@ -87,7 +89,8 @@ public class ArticleController extends BaseController {
      * 文章列表【旧label】
      */
     @GetMapping("/info/label-{id}-{pageNum}.html")
-    public String toArticleLabel(@PathVariable("id") Integer id, @PathVariable("pageNum") Integer pageNum, final Model model) {
+    public String toArticleLabel(@PathVariable("id") Integer id, @PathVariable("pageNum") Integer pageNum,
+            final Model model) {
         List<BaseLink> typeList = articleService.getArticleTypes();
         List<BaseLink> data = articleService.getArticleLabels().getData();
         List<ImageLink> Ads = articleService.getLastestInfoAds().getData();
@@ -98,10 +101,45 @@ public class ArticleController extends BaseController {
         model.addAttribute("labelId", id);
         model.addAttribute("pageNum", pageNum);
         model.addAttribute("isSearch", false);
-        //model.addAttribute("pagePath", String.format("/info/label-%s-1.html", id));
+        // model.addAttribute("pagePath", String.format("/info/label-%s-1.html", id));
         return ARTICLE_LIST_PATH;
     }
 
+    /**
+     * 精选文章和美业资料列表
+     */
+    @GetMapping("/info/articlerecommendation-{id}-{pageNum}.html")
+    public String selectedList(@PathVariable("id") Integer id, @PathVariable("pageNum") Integer pageNum,
+            final Model model) {
+        PageHelper.startPage(pageNum, 10);
+        List<BaseLink> typeList = articleService.getArticleTypes();
+        PaginationVo pageData = null;
+        if (id == 1) {// 精选文章
+            List<ImageLink> infoSelected = articleService.getArticleSelected(null, null);
+            pageData = new PaginationVo<ImageLink>(infoSelected);
+        } else {// 美业资料
+            List<CmProductArchiveFile> archiveFiles = articleService.findArchiveFileAddTime(null, null);
+            pageData = new PaginationVo<CmProductArchiveFile>(archiveFiles);
+        }
+        if (id == 1) {// 精选文章
+            List<CmProductArchiveFile> archiveFiles = articleService.findArchiveFileAddTime(0, 3);
+            List<ProductList> productSellNumbers = productService.getProductSellNumbers();
+            model.addAttribute("productSellNumbers", productSellNumbers);// 销量前三商品
+            model.addAttribute("archiveFiles", archiveFiles);// 最新美业资料top3
+        }
+        List<BaseLink> data = articleService.getArticleLabels().getData();
+        List<ImageLink> Ads = articleService.getLastestInfoAds().getData();
+        model.addAttribute("ads", Ads);
+        model.addAttribute("labels", data);
+        model.addAttribute("articleType", typeList);// 导航栏
+        model.addAttribute("pageData", pageData);
+        model.addAttribute("labelId", 0);
+        model.addAttribute("pageNum", pageNum);
+        model.addAttribute("isSearch", true);
+        System.out.println("pageData" + pageData);
+        return ARTICLE_RECOMMENDATION;
+    }
+
     /**
      * 文章搜索结果
      */
@@ -117,7 +155,7 @@ public class ArticleController extends BaseController {
         model.addAttribute("labelId", 0);
         model.addAttribute("pageNum", pageNum);
         model.addAttribute("isSearch", false);
-        //model.addAttribute("pagePath", "/info/search.html");
+        // model.addAttribute("pagePath", "/info/search.html");
         return ARTICLE_LIST_PATH;
     }
 
@@ -125,7 +163,8 @@ public class ArticleController extends BaseController {
      * 文章详情【旧】
      */
     @GetMapping("/info/detail-{id}-1.html")
-    public String toArticleDetail(@PathVariable("id") Integer id, final Model model, ServerWebExchange serverWebExchange, ServerHttpResponse response) {
+    public String toArticleDetail(@PathVariable("id") Integer id, final Model model,
+            ServerWebExchange serverWebExchange, ServerHttpResponse response) {
         List<BaseLink> typeList = articleService.getArticleTypes();
         Article article = articleService.getArticleInfo(id);
         if (article == null) {
@@ -160,16 +199,20 @@ public class ArticleController extends BaseController {
         log.info("文章详情访问来源记录完成========》" + source);
         List<BaseLink> data = articleService.getArticleLabels().getData();
         List<ImageLink> Ads = articleService.getLastestInfoAds().getData();
-//        List<Article> articles = articleService.getInfoById(id);
+        List<Article> articles = new ArrayList<>();
+        if (null != article && article.getAutoStatus() == 0) {
+            articles = articleService.getInfoById(id);
+        } else {
+            articles = articleService.getArticleRelatedId(id.toString());
+        }
         String relatedLabels = articleService.relatedLabel(id);
-        List<ImageLink> infoSelected = articleService.getArticleSelected();
-        List<ImageLink> infoRelated = articleService.getArticleRelatedId(id.toString());
-        List<CmProductArchiveFile> archiveFiles = articleService.findArchiveFileAddTime();
+        List<ImageLink> infoSelected = articleService.getArticleSelected(0, 5);
+        List<CmProductArchiveFile> archiveFiles = articleService.findArchiveFileAddTime(0, 3);
         List<ProductList> productSellNumbers = productService.getProductSellNumbers();
-        model.addAttribute("infoSelected", infoSelected);//精选文章
-        model.addAttribute("productSellNumbers", productSellNumbers);//销量前三商品
-        model.addAttribute("archiveFiles", archiveFiles);//最新美业资料top3
-        model.addAttribute("articles", infoRelated);//相关文章
+        model.addAttribute("infoSelected", infoSelected);// 精选文章
+        model.addAttribute("productSellNumbers", productSellNumbers);// 销量前三商品
+        model.addAttribute("archiveFiles", archiveFiles);// 最新美业资料top3
+        model.addAttribute("articles", articles);// 相关文章
         model.addAttribute("ads", Ads);
         model.addAttribute("labels", data);
         model.addAttribute("article", article);
@@ -199,8 +242,6 @@ public class ArticleController extends BaseController {
         return ERROR_PATH;
     }
 
-    
-
     /**
      * 获取文章热门标签
      */
@@ -216,8 +257,8 @@ public class ArticleController extends BaseController {
     @GetMapping("/article/recommend")
     @ResponseBody
     public JsonModel<PageInfo<ImageLink>> getArticleRecommended(Integer typeId,
-                                                                @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
-                                                                @RequestParam(value = "pageSize", defaultValue = "3") int pageSize) {
+            @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+            @RequestParam(value = "pageSize", defaultValue = "3") int pageSize) {
         return articleService.getArticleRecommended(typeId, pageNum, pageSize);
     }
 
@@ -227,8 +268,8 @@ public class ArticleController extends BaseController {
     @GetMapping("/article/related")
     @ResponseBody
     public JsonModel<PageInfo<Article>> getArticleRelated(Integer id, String labels,
-                                                          @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
-                                                          @RequestParam(value = "pageSize", defaultValue = "3") int pageSize) {
+            @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+            @RequestParam(value = "pageSize", defaultValue = "3") int pageSize) {
         return articleService.getArticleRelated(id, labels, pageNum, pageSize);
     }
 

+ 4 - 4
src/main/java/com/caimei/www/mapper/ArticleDao.java

@@ -53,7 +53,7 @@ public interface ArticleDao {
      * @param
      * @return
      */
-    List<ImageLink> getArticleSelected();
+    List<ImageLink> getArticleSelected(@Param("pageNum") Integer pageNum,@Param("pageSize")  Integer pageSize);
 
     /**
      * 获取精选文章推荐
@@ -61,14 +61,14 @@ public interface ArticleDao {
      * @param
      * @return
      */
-    List<ImageLink> getArticleRelatedId(String relatedId);
+    List<Article> getArticleRelatedId(String relatedId);
     /**
-     * 获取最新美业资料top3
+     * 获取美业资料
      *
      * @param
      * @return
      */
-    List<CmProductArchiveFile> findArchiveFileAddTime();
+    List<CmProductArchiveFile> findArchiveFileAddTime(@Param("pageNum") Integer pageNum,@Param("pageSize")  Integer pageSize);
 
     /**
      * 获取文章广告

+ 4 - 0
src/main/java/com/caimei/www/pojo/page/Article.java

@@ -56,6 +56,10 @@ public class Article implements Serializable {
      * 标签
      */
     private String label;
+    /**
+     * 推荐方式
+     */
+    private Integer autoStatus;
     /**
      * 标签 id数组
      */

+ 3 - 3
src/main/java/com/caimei/www/service/page/ArticleService.java

@@ -35,18 +35,18 @@ public interface ArticleService {
     /**
      * 获取文章推荐
      */
-    List<ImageLink> getArticleSelected();
+    List<ImageLink> getArticleSelected(Integer pageNum,   Integer pageSize);
     /**
      * 获取相关文章
      */
-    List<ImageLink> getArticleRelatedId(String relatedId);
+    List<Article> getArticleRelatedId(String relatedId);
     /**
      * 获取最新美业资料top3
      *
      * @param
      * @return
      */
-    List<CmProductArchiveFile> findArchiveFileAddTime();
+    List<CmProductArchiveFile> findArchiveFileAddTime(Integer pageNum,   Integer pageSize);
     /**
      * 获取相关文章
      */

+ 7 - 6
src/main/java/com/caimei/www/service/page/impl/ArticleServiceImpl.java

@@ -13,6 +13,7 @@ import com.caimei.www.utils.PriceUtil;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.github.pagehelper.util.StringUtil;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.http.server.reactive.ServerHttpRequest;
 import org.springframework.stereotype.Service;
@@ -96,8 +97,8 @@ public class ArticleServiceImpl implements ArticleService {
      *
      */
     @Override
-    public List<ImageLink> getArticleSelected() {
-        List<ImageLink> selected = articleDao.getArticleSelected();
+    public List<ImageLink> getArticleSelected(Integer pageNum,   Integer pageSize) {
+        List<ImageLink> selected = articleDao.getArticleSelected( pageNum,    pageSize);
         selected.forEach(item -> {
             item.setImage(ImageUtil.getImageURL("", item.getImage(), 0, domain));
         });
@@ -108,8 +109,8 @@ public class ArticleServiceImpl implements ArticleService {
      *
      */
     @Override
-    public List<ImageLink> getArticleRelatedId(String relatedId){
-        List<ImageLink> infoRelated = articleDao.getArticleRelatedId(relatedId);
+    public List<Article> getArticleRelatedId(String relatedId){
+        List<Article> infoRelated = articleDao.getArticleRelatedId(relatedId);
         infoRelated.forEach(item -> {
             item.setImage(ImageUtil.getImageURL("", item.getImage(), 0, domain));
         });
@@ -120,8 +121,8 @@ public class ArticleServiceImpl implements ArticleService {
      *
      */
     @Override
-    public List<CmProductArchiveFile> findArchiveFileAddTime() {
-        List<CmProductArchiveFile> selected = articleDao.findArchiveFileAddTime();
+    public List<CmProductArchiveFile> findArchiveFileAddTime(Integer pageNum,   Integer pageSize) {
+        List<CmProductArchiveFile> selected = articleDao.findArchiveFileAddTime(pageNum,pageSize);
         return selected;
     }
 

+ 113 - 0
src/main/java/com/caimei/www/utils/PaginationVo.java

@@ -0,0 +1,113 @@
+package com.caimei.www.utils;
+
+import lombok.Builder;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2021/4/7
+ */
+@Data
+public class PaginationVo<T> implements Serializable {
+    /** 当前页码 */
+    @Builder.Default
+    private int pageNum = 1;
+    /** 每页大小 */
+    @Builder.Default
+    private int pageSize = 10;
+    /** 总记录数 */
+    private int totalRecord;
+    /** 总页数 */
+    private int totalPage;
+    /** 是否有后一页 */
+    private boolean hasNextPage;
+    /** 是否有前一页 */
+    private boolean hasPreviousPage;
+    /** 查询结果 */
+    List<T> results;
+
+    public PaginationVo(List<T> list) {
+        if (list instanceof com.github.pagehelper.Page) {
+            com.github.pagehelper.Page<T> page = (com.github.pagehelper.Page<T>) list;
+            this.pageNum = page.getPageNum();
+            this.pageSize = page.getPageSize();
+            this.totalRecord = (int) page.getTotal();
+            this.totalPage = page.getPages();
+            setHasPreviousAndNext();
+            this.results = page;
+        } else if (list != null) {
+            this.pageSize = list.size();
+            this.totalRecord = list.size();
+            this.totalPage = 1;
+            this.results = list;
+        }
+    }
+
+    public PaginationVo(int pageNum, int pageSize, int totalRecord, List<T> results) {
+        super();
+        this.pageNum = pageNum;
+        this.pageSize = pageSize;
+        this.totalRecord = totalRecord;
+        this.totalPage = totalRecord % pageSize == 0 ? totalRecord / pageSize : totalRecord / pageSize + 1;
+        this.results = results;
+        if (this.pageNum < 2) {
+            hasPreviousPage = false;
+        } else {
+            hasPreviousPage = true;
+        }
+        if (this.pageNum < totalPage) {
+            hasNextPage = true;
+        } else {
+            hasNextPage = false;
+        }
+    }
+
+    public PaginationVo(int pageNum, int maxSize, int totalRecord, int totalPage,
+                        List<T> results) {
+        super();
+        this.pageNum = pageNum;
+        this.pageSize = maxSize;
+        this.totalRecord = totalRecord;
+        this.totalPage = totalPage;
+        this.results = results;
+        if (this.pageNum < 2) {
+            hasPreviousPage = false;
+        } else {
+            hasPreviousPage = true;
+        }
+        if (this.pageNum < totalPage) {
+            hasNextPage = true;
+        } else {
+            hasNextPage = false;
+        }
+    }
+
+    public PaginationVo() {super();}
+
+    public void setHasPreviousAndNext() {
+        if (this.pageNum < 2) {
+            hasPreviousPage = false;
+        } else {
+            hasPreviousPage = true;
+        }
+        if (this.pageNum < totalPage) {
+            hasNextPage = true;
+        } else {
+            hasNextPage = false;
+        }
+    }
+
+    public int countTotalPage() {
+        int total = totalRecord % pageSize == 0 ? totalRecord / pageSize : totalRecord / pageSize + 1;
+        this.setTotalPage(total);
+        return total;
+    }
+
+    private static final long serialVersionUID = 1L;
+}
+

+ 22 - 6
src/main/resources/mapper/ArticleMapper.xml

@@ -53,14 +53,26 @@
 		and a.auditStatus = 2
 		and NOW() >= a.pubdate
 		order by cr.sort asc, a.pubdate desc
+		<if test="pageNum != null">
+			limit #{pageNum},#{pageSize}
+		</if>
 	</select>
 
-    <select id="getArticleRelatedId" resultType="com.caimei.www.pojo.page.ImageLink" parameterType="string">
-		select  a.id,
-				a.title,
-				a.guidanceImage as image
+    <select id="getArticleRelatedId" resultType="com.caimei.www.pojo.page.Article" parameterType="string">
+		select  a.id as id,
+				a.title as title,
+				a.guidanceImage as image,
+				a.publisher as publisher,
+				a.pubdate as publishDate,
+				a.recommendContent as intro,
+				a.infoContent as content,
+				(IFNULL(c.pv, 0) + IFNULL(a.basePv, 0) + IFNULL((c.num + a.basePraise), 0)) as pv,
+				a.label as label,
+				a.typeId as typeId,
+				a.relatedLabels
 		from cm_related cr
-		left join info a on a.id=cr.relatedId
+				 left join info a on a.id=cr.relatedId
+				 left join info_praise c on a.id = c.infoId
 		where cr.type=1
 		and a.enabledStatus = 1
 		and a.auditStatus = 2
@@ -73,7 +85,10 @@
 		select cf.id,cc.productArchiveId,cf.archiveContentId,fileName, ossName,waterOssName,ossUrl,uploadTime
 		from cm_product_archive_file cf left join cm_product_archive_content cc on cf.archiveContentId = cc.id
 		where cc.type = 3
-		order by addTime desc  limit 0,3
+		order by addTime desc
+		<if test="pageNum != null">
+			limit #{pageNum},#{pageSize}
+		</if>
 	</select>
     <select id="getArticleRelated" resultType="com.caimei.www.pojo.page.Article">
         select
@@ -158,6 +173,7 @@
 		  a.label AS label,
 		  a.typeId AS typeId,
 		  a.keyword AS keyword,
+		  a.autoStatus AS autoStatus,
 		  a.recommendContent AS recommendContent,
 		  a.source AS source,
 		  IFNULL((c.num + a.basePraise), 0) AS likes

+ 58 - 0
src/main/resources/static/css/article/recommendation.css

@@ -16,6 +16,64 @@
         min-height: 900px;
     }
 
+    .content .mainData .selectList {
+        padding: 24px 16px;
+        background: #fff;
+    }
+
+    .content .mainData .selectList .select-title {
+        font-size: 18px;
+        color: #333;
+        font-weight: bold;
+        border-bottom: 1px solid #F0F0F0;
+        height: 36px;
+    }
+
+    .content .mainData .selectList .select-title div:nth-child(1) {
+        height: 100%;
+        border-bottom: 2px solid #FF5B00;
+    }
+
+    .content .mainData .selectList .select-content .select-content-item{
+        display: flex;
+        align-items: center;
+        padding: 24px 0;
+        border-bottom: 1px solid #F0F0F0;
+    }
+    .content .mainData .selectList .select-content .select-content-item .img-left {
+        height: 168px;
+        width: 260px;
+        margin-right: 16px;
+    }
+    .content .mainData .selectList .select-content .select-content-item .item-content {
+        display: flex;
+        justify-content: space-between;
+        flex-direction: column;
+        height: 168px;
+    }
+    .select-content-item .item-content .item-1 {
+        font-size: 18px;
+        color: #333;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        margin-bottom: 13px;
+    }
+    .select-content-item .item-content .item-2 {
+        color: #888888;
+        font-size: 14px;
+        line-height: 24px;
+        margin-bottom: 16px;
+    }
+    .select-content-item .item-content .item-3 {
+        font-size: 14px;
+        color: #333;
+    }
+    .select-content-item .item-content .item-4 {
+        font-size: 14px;
+        color: #B2B2B2;
+    }
+
     /*公告和文件*/
     .infomationlist {
         width: 1185px;

+ 8 - 1
src/main/resources/static/js/article/recommendation.js

@@ -1,5 +1,6 @@
 var recommendation = new Vue({
     el: "#Recommendation",
+    mixins: [cmSysVitaMixins],
     data: {
         status: {
             'isDocument': 0, // 文件
@@ -93,7 +94,7 @@ var recommendation = new Vue({
         },
         //获取更多数据
         handleMore (num) {
-            if (state===2) {
+            if (this.state===2) {
                 if (this.params.num < this.pageTotal) { // 获取列表数据
                     this.params.num = this.params.num + 1;
                     this.getNewList(num);
@@ -119,5 +120,11 @@ var recommendation = new Vue({
                 this.pageInput = 1;
             }
         },
+        //页面跳转
+        changeLink() {
+            if (this.state === 1) {
+                window.location.href = '/info/articlerecommendation-1-' + this.pageInput + '.html?isSelected'
+            }
+        }
     }
 })

+ 1 - 1
src/main/resources/templates/article/components/article-sidebar.html

@@ -53,7 +53,7 @@
             <span class="more-product">
 <!--                <span v-if="recommend.nextPage" class="next" @click="getRecommend(typeId, recommend.nextPage)"></span>-->
 <!--                <span v-if="recommend.prePage" class="pre" @click="getRecommend(typeId, recommend.prePage)"></span>-->
-                <a href="/info/articlerecommendation-3-1.html?isDocument">更多 ></a>
+                <a href="/info/articlerecommendation-2-1.html?isDocument">更多 ></a>
             </span>
         </p>
         <div class="row" th:each="file: ${archiveFiles}">

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

@@ -62,7 +62,7 @@
                 <div class="featured-title">
                     <div>精选推荐</div>
                     <div>
-                        <a href="/info/articlerecommendation-3-1.html?isSelected">更多 ></a>
+                        <a href="/info/articlerecommendation-1-1.html?isSelected">更多 ></a>
                     </div>
                 </div>
                 <div class="featured-content">

+ 35 - 12
src/main/resources/templates/article/recommendation.html

@@ -12,24 +12,46 @@
 <div id="Recommendation" v-cloak>
   <div class="content clearfix" v-if="state == 1">
     <div class="mainData">
-      <div v-if="isPC && pageTotal>1" class="pageWrap clear">
-        <a v-if="params.num>1" class="prev" :href="paginationUrl(params.num*1-1)"></a>
-        <template v-for="n in showPageBtn">
-          <a v-if="n" :class="{'on':(n==params.num)}" :href="paginationUrl(n)" v-text="n"></a>
-          <span v-else>···</span>
+      <div class="selectList">
+        <div class="select-title">
+          <div>精选推荐</div>
+        </div>
+        <div class="select-content">
+          <div class="select-content-item" th:each="select: ${pageData.results}">
+            <div class="img-left">
+              <img style="width: 100%;height: 100%;" th:src="${select.image}" />
+            </div>
+            <div class="item-content">
+              <div>
+                <div class="item-1" th:text="${select.title}"></div>
+                <div class="item-2" th:text="${select.title}"></div>
+                <div class="item-3" th:text="${select.title}"></div>
+              </div>
+              <div class="item-4" th:text="${select.title}"></div>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div v-if="isPC" class="pageWrap clear" th:if="${pageData.totalRecord} > 0">
+        <a class="prev" th:href="'/info/articlerecommendation-1-' + ${pageData.pageNum - 1} + '.html?isSelected'" th:if="${pageData.hasPreviousPage}"></a>
+        <template th:each="selectInfo: ${pageData.totalPage}">
+          <a th:href="'/info/articlerecommendation-1-' + ${selectInfo} + '.html?isSelected'" th:text="${selectInfo}"></a>
+<!--          <span th:else>···</span>-->
         </template>
-        <a v-if="params.num<pageTotal" class="next" :href="paginationUrl(params.num*1+1)"></a>
-        <span>共<b v-text="pageTotal>1?pageTotal:1"></b>页</span>
+        <a class="next" th:if="${pageData.hasNextPage}" th:href="'/info/articlerecommendation-1-' + ${pageData.pageNum + 1} + '.html?isSelected'"></a>
+        <span>共<b th:text="${pageData.totalPage}"></b>页</span>
         <span>跳至</span>
-        <input v-model="pageInput" @blur="checkNum()"/>
+        <input v-model="pageInput"/>
         <span>页</span>&nbsp;
-        <a class="btn" :href="paginationUrl(pageInput)">点击跳转</a>
+        <a class="btn" href="javascript:void(0)" @click="changeLink">点击跳转</a>
       </div>
     </div>
     <!--侧边栏Ross广告图-->
     <div v-if="isPC && isRossShow" class="article-right-ross" :class="isRossShow ? 'show' : 'none'">
       <a href="/supplier-1378.html" v-if="isPC"><img src="/img/ross/ross-image@1x.jpg" alt="深圳艾斯佰丽生物科技有限公司"></a>
     </div>
+    <!--侧边栏-->
+    <template th:replace="article/components/article-sidebar"></template>
   </div>
   <div class="infomationlist" v-else>
     <div class="title" v-if="state == 2">
@@ -52,7 +74,7 @@
           </a>
         </li>
       </ul>
-      <div class="pageWrap clear">
+      <div class="pageWrap clear" v-if="state !== 2">
         <a class="prev" :href="paginationUrl(params.num*1-1)"></a>
         <template v-for="n in showPageBtn">
           <a v-if="n" :class="{'on':(n==params.num)}" :href="paginationUrl(n)" v-text="n"></a>
@@ -65,7 +87,7 @@
         <span>页</span>&nbsp;
         <a class="btn" :href="paginationUrl(pageInput)">点击跳转</a>
       </div>
-      <div v-if="isPC && pageTotal>1" class="pageWrap clear">
+      <div v-if="isPC && pageTotal>1 && state == 2" class="pageWrap clear">
         <a v-if="params.num>1" class="prev" :href="paginationUrl(params.num*1-1)"></a>
         <template v-for="n in showPageBtn">
           <a v-if="n" :class="{'on':(n==params.num)}" :href="paginationUrl(n)" v-text="n"></a>
@@ -83,7 +105,8 @@
   </div>
 </div>
 
-
+<script type="text/javascript">
+</script>
 
 <template th:replace="article/components/article-drawer"></template>
 <template th:replace="article/components/article-footer"></template>