瀏覽代碼

no message

xingzai 2 年之前
父節點
當前提交
7da505b934
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      controllers/search.go

+ 3 - 2
controllers/search.go

@@ -1,6 +1,7 @@
 package controllers
 package controllers
 
 
 import (
 import (
+	"fmt"
 	"github.com/rdlucklib/rdluck_tools/paging"
 	"github.com/rdlucklib/rdluck_tools/paging"
 	"hongze/hongze_clpt/models"
 	"hongze/hongze_clpt/models"
 	"hongze/hongze_clpt/services"
 	"hongze/hongze_clpt/services"
@@ -187,7 +188,7 @@ func (this *MobileSearchController) ListHomeArtAndChart() {
 			return
 			return
 		}
 		}
 		result = tmpResult
 		result = tmpResult
-
+		fmt.Println(tmpTotalResult)
 		if int(tmpTotalResult) < currentIndex*pageSize {
 		if int(tmpTotalResult) < currentIndex*pageSize {
 			startSizeBody := startSize - int(tmpTotalResult)
 			startSizeBody := startSize - int(tmpTotalResult)
 			if startSizeBody < 0 {
 			if startSizeBody < 0 {
@@ -213,7 +214,7 @@ func (this *MobileSearchController) ListHomeArtAndChart() {
 				startSizeIk = 0
 				startSizeIk = 0
 			}
 			}
 			var pageSizeIk int
 			var pageSizeIk int
-			pageSizeIk = pageSize - len(tmpResult)
+			pageSizeIk = pageSize - len(result)
 			tmpResultIk, _, err := services.EsArticleSearch(keyWord, startSizeIk, pageSizeIk, orderColumn, 2)
 			tmpResultIk, _, err := services.EsArticleSearch(keyWord, startSizeIk, pageSizeIk, orderColumn, 2)
 			if err != nil {
 			if err != nil {
 				br.Msg = "检索失败"
 				br.Msg = "检索失败"