From c808d0fa446691dc57faf63eeb98a824ccb05762 Mon Sep 17 00:00:00 2001 From: knowpia <9812993@qq.com> Date: Tue, 13 Sep 2022 13:24:02 +0800 Subject: [PATCH] code add --- app/controller/Article.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controller/Article.php b/app/controller/Article.php index c4f3b16..10b0751 100644 --- a/app/controller/Article.php +++ b/app/controller/Article.php @@ -61,10 +61,11 @@ class Article $where = "userid={$userid} and id<".$lastIndex; } $result["lastIndex"] = 0; + $result["list"] = []; $list = Db::name("app_article")->where($where)->order("id desc")->order('id desc')->limit(env("page_count"))->select()->toArray(); foreach($list as $vo){ $result['lastIndex'] = $vo['id']; - $result["list"][] = $vo; + $result["data"][] = $vo; } if(count($list)