From fca918115fd9d06f98dd8d003b48190362875942 Mon Sep 17 00:00:00 2001 From: knowpia <9812993@qq.com> Date: Tue, 13 Sep 2022 15:58:52 +0800 Subject: [PATCH] fix bug --- app/controller/Article.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/controller/Article.php b/app/controller/Article.php index 4e31001..9d92f48 100644 --- a/app/controller/Article.php +++ b/app/controller/Article.php @@ -80,6 +80,14 @@ class Article $article_id = $GLOBALS['data']['data']['article_id']; $info = Db::name('app_article')->where("id",$article_id)->find(); if(empty($info)) return show("找不到该动态信息!"); + + $lists = Db::name('app_article') + ->where("userid",$info["userid"]) + ->where("id","<>",$info['id']) + ->order("id desc") + ->limit(env("page_count")) + ->select(); + $info['other_list'] = $lists; return show(SUCCESS_MESSAGE,SUCCESS_CODE,$info); }