From 162bf588991a0e9faaa2d7577e7986161c693d23 Mon Sep 17 00:00:00 2001 From: ouzhiqiang <835402500@qq.com> Date: Fri, 19 Sep 2025 14:59:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/controller/TopicNas.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/index/controller/TopicNas.php b/app/index/controller/TopicNas.php index 6471e76c..ad52c5fc 100644 --- a/app/index/controller/TopicNas.php +++ b/app/index/controller/TopicNas.php @@ -227,10 +227,13 @@ class TopicNas extends Common foreach ($article_categorys_new as &$vvv) { $articles = $vvv['article']; if ( isset($article_categorys_two[$vvv['id']]) ) { - foreach ($article_categorys_two[$vvv['id']] as $k=>$v) { - $articles = array_merge($articles,$v['article']); + foreach ($article_categorys_two[$vvv['id']] as $v) { + foreach ($v['article'] as $av) { + if ( count($articles) < 3 ) { + array_push($articles,$av); + } + } } - } $vvv['article'] = $articles; }