code add
This commit is contained in:
@@ -61,10 +61,11 @@ class Article
|
|||||||
$where = "userid={$userid} and id<".$lastIndex;
|
$where = "userid={$userid} and id<".$lastIndex;
|
||||||
}
|
}
|
||||||
$result["lastIndex"] = 0;
|
$result["lastIndex"] = 0;
|
||||||
|
$result["list"] = [];
|
||||||
$list = Db::name("app_article")->where($where)->order("id desc")->order('id desc')->limit(env("page_count"))->select()->toArray();
|
$list = Db::name("app_article")->where($where)->order("id desc")->order('id desc')->limit(env("page_count"))->select()->toArray();
|
||||||
foreach($list as $vo){
|
foreach($list as $vo){
|
||||||
$result['lastIndex'] = $vo['id'];
|
$result['lastIndex'] = $vo['id'];
|
||||||
$result["list"][] = $vo;
|
$result["data"][] = $vo;
|
||||||
}
|
}
|
||||||
if(count($list)<env("PAGE_COUNT")){
|
if(count($list)<env("PAGE_COUNT")){
|
||||||
$result["lastIndex"] = 0;
|
$result["lastIndex"] = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user