From 1b157c6e6d91a2d101714de571dc174419308fa7 Mon Sep 17 00:00:00 2001 From: knowpia <9812993@qq.com> Date: Mon, 10 Oct 2022 08:45:41 +0800 Subject: [PATCH] fix bug --- app/controller/Ranking.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controller/Ranking.php b/app/controller/Ranking.php index 36963d9..b145da2 100644 --- a/app/controller/Ranking.php +++ b/app/controller/Ranking.php @@ -49,14 +49,15 @@ class Ranking if (empty($list)) { return show("获取成功", SUCCESS_CODE, $result); } + + $result = StudentToArray($list); + if ($list->currentPage() < $list->lastPage()) { $result['lastIndex'] = $lastIndex + 1; } else { $result['lastIndex'] = 0; } - - $result = StudentToArray($list); return show(SUCCESS_MESSAGE, SUCCESS_CODE, $result); }