From 4ebe5b4d8be539154660f1c06f9c476776f474ed Mon Sep 17 00:00:00 2001 From: mengkun <1163540807@qq.com> Date: Sat, 5 Aug 2017 17:11:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=90=9C=E7=B4=A2=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E9=87=8D=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复搜索分页重复问题 --- api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api.php b/api.php index 8662f34..995812c 100644 --- a/api.php +++ b/api.php @@ -161,7 +161,7 @@ switch($types) if($pages<1) $pages=1; //纠正错误的值 $offset= ($pages-1) * $limit; //偏移量 - $data = $API->search($s, $pages, $limit); + $data = $API->search($s, $offset + 1, $limit); echojson($data); } @@ -192,4 +192,4 @@ function echojson($data) //json和jsonp通用 } else { die($data); } -} \ No newline at end of file +}