fix bug
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user