From 423a5fc27fafbf79065a9bf27bac28e27c173f19 Mon Sep 17 00:00:00 2001 From: ouzhiqiang <835402500@qq.com> Date: Fri, 19 Sep 2025 11:22:25 +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 | 1 + 1 file changed, 1 insertion(+) diff --git a/app/index/controller/TopicNas.php b/app/index/controller/TopicNas.php index a4bedd0b..44b09cc3 100644 --- a/app/index/controller/TopicNas.php +++ b/app/index/controller/TopicNas.php @@ -347,6 +347,7 @@ class TopicNas extends Common $parent_two = ArticleCategoryModel::ParentChild(array_column($categorys, 'id'))->language($this->lang_id)->column('pid','id');//二级分类id $articles_data = $articles->toArray(); foreach ($articles_data as &$v) { + $v['pid'] = 0; if ( isset($parent_two[$v['category_id']]) ) { $v['pid'] = $v['category_id']; $v['category_id'] = $parent_two[$v['category_id']];