This commit is contained in:
knowpia
2022-09-13 15:48:46 +08:00
parent f32e862db8
commit f4eec7077f

View File

@@ -54,7 +54,7 @@ class Article
if(empty($userid)){
return show("请登录后操作!",NEED_LOGIN);
}
$lastIndex = empty($GLOBALS['data']['data']["lastindex"])?0:$GLOBALS['data']['data']["lastindex"];
$lastIndex = empty($GLOBALS['data']['data']["lastindex"])?0:$GLOBALS['data']['data']["lastindex"];
if($lastIndex == 0){
$where = "userid={$userid} and id>0";
}else{
@@ -62,7 +62,8 @@ class Article
}
$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')->limit(env("page_count"))->select()->toArray();
print_r($list);
foreach($list as $vo){
$result['lastIndex'] = $vo['id'];
$result["list"][] = $vo;