chao 4 år sedan
förälder
incheckning
95f25095bd

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

@@ -37,7 +37,7 @@ public class ArticleController extends BaseController {
      * 文章列表【旧center】
      */
     @GetMapping("/info/center-{id}-{pageNum}.html")
-    public String toArticleList(@PathVariable("id") Integer id, @PathVariable("id") Integer pageNum, final Model model) {
+    public String toArticleList(@PathVariable("id") Integer id, @PathVariable("pageNum") Integer pageNum, final Model model) {
         List<BaseLink> typeList = articleService.getArticleTypes();
         model.addAttribute("articleType", typeList);
         model.addAttribute("typeId", id);
@@ -51,7 +51,7 @@ public class ArticleController extends BaseController {
      * 文章列表【旧label】
      */
     @GetMapping("/info/label-{id}-{pageNum}.html")
-    public String toArticleLabel(@PathVariable("id") Integer id, @PathVariable("id") Integer pageNum, final Model model) {
+    public String toArticleLabel(@PathVariable("id") Integer id, @PathVariable("pageNum") Integer pageNum, final Model model) {
         List<BaseLink> typeList = articleService.getArticleTypes();
         model.addAttribute("articleType", typeList);
         model.addAttribute("typeId", 0);

+ 1 - 1
src/main/resources/static/js/article/list.js

@@ -101,7 +101,7 @@ var articleList = new Vue({
     created: function () {
         if(isPC){
             this.params.size = getUrlParam("pageSize") ? getUrlParam("pageSize") * 1 : 8;
-            this.params.num = getUrlParam("pageNum") ? getUrlParam("pageNum") * 1 : 1;
+            this.params.num = $("#pageNum").val() ? $("#pageNum").val()*1 : 1;
         }else{
             this.params.size = 8;
             this.params.num = 1;

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

@@ -22,6 +22,7 @@
     </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="${spiServer}" id="spiServer"><input type="hidden" th:value="${coreServer}" id="coreServer">
     <input type="hidden" th:value="${agent}" id="userAgent">
 </header>