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();
|
$list = Db::name("student")->where($where)->order('hot desc')->limit(env("page_count"))->where($where)->select()->toArray();
|
||||||
$result = StudentToArray($list);
|
$result = StudentToArray($list);
|
||||||
|
|
||||||
|
|
||||||
return show(SUCCESS_MESSAGE.'!',SUCCESS_CODE,$result);
|
return show(SUCCESS_MESSAGE.'!',SUCCESS_CODE,$result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,14 +44,16 @@ class Student
|
|||||||
if (empty($list)) {
|
if (empty($list)) {
|
||||||
return show("获取成功", SUCCESS_CODE, $result);
|
return show("获取成功", SUCCESS_CODE, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$result = StudentToArray($list);
|
||||||
|
|
||||||
if ($list->currentPage() < $list->lastPage()) {
|
if ($list->currentPage() < $list->lastPage()) {
|
||||||
$result['lastIndex'] = $lastIndex + 1;
|
$result['lastIndex'] = $lastIndex + 1;
|
||||||
} else {
|
} else {
|
||||||
$result['lastIndex'] = 0;
|
$result['lastIndex'] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$result = StudentToArray($list);
|
|
||||||
return show(SUCCESS_MESSAGE, SUCCESS_CODE, $result);
|
return show(SUCCESS_MESSAGE, SUCCESS_CODE, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user