From 0e47c5294f08568cb85d0814c98e298d647176e7 Mon Sep 17 00:00:00 2001 From: yirenyishi Date: Wed, 21 Nov 2018 23:42:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=A1=B5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/beeblog.db | Bin 45056 -> 45056 bytes service/BlogService.go | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/data/beeblog.db b/data/beeblog.db index 368b68453f4bdd2d598a98b94e8203afe71716e7..05cbf69f54c66cbc9524e9304262bc8ebf888c5d 100644 GIT binary patch delta 744 zcmaiyy-or_5XTQfapX8KF*ZsR5Mx1DW@f+64I%NPCA@&SoW|Oa*mHy@(Ad~%VL_`r zfQe5+sPrv7q7b}0bldsw?>95M!)bOn&ED>026yGt%-|(>Y-Q@Nkb`ZD0u=ZYCyM5Sww`#73RXO?h>W0EyTiga7~l diff --git a/service/BlogService.go b/service/BlogService.go index bd5a7d8..1157f5c 100644 --- a/service/BlogService.go +++ b/service/BlogService.go @@ -51,7 +51,7 @@ func FindBlogs(num int, size int, cat int64, flag int) (*utils.Page, error) { qs = qs.OrderBy("-Browses") } - qs = qs.Limit(size,page.PageNo-1) + qs = qs.Limit(size, (page.PageNo-1) * size) _, err = qs.All(&blogs) if err != nil { return nil, err