diff --git a/app/index/controller/TopicNas.php b/app/index/controller/TopicNas.php index 4381463c..e2945a12 100644 --- a/app/index/controller/TopicNas.php +++ b/app/index/controller/TopicNas.php @@ -275,6 +275,11 @@ class TopicNas extends Common $article_categorys_two[$vv->pid][] = $vv; } } + if ( !empty($article_categorys_two) ) { + foreach ($article_categorys_new as &$vvv) { + $vvv['child'] = isset($article_categorys_two[$vvv->pid])?$article_categorys_two[$vvv->pid]:''; + } + } } dump($article_categorys_new); dump($article_categorys_two);exit;