fix bug
This commit is contained in:
@@ -35,6 +35,8 @@ class Search
|
||||
|
||||
$list = Db::name("student")->where($where)->order('hot desc')->limit(env("page_count"))->where($where)->select()->toArray();
|
||||
$result = StudentToArray($list);
|
||||
|
||||
|
||||
return show(SUCCESS_MESSAGE.'!',SUCCESS_CODE,$result);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,14 +44,16 @@ class Student
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user