Kirin 3 年之前
父节点
当前提交
9d4d117901
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/api/controller/activity/TreeController.php

+ 1 - 1
app/api/controller/activity/TreeController.php

@@ -18,7 +18,7 @@ class TreeController
                 $father = [$item['id']];
                 $layer = 1;
                 while (count($father) && $layer <= 12) {
-                    $father = TreeRecommend::where('parent_id', 'in', $children)->column('id');
+                    $father = TreeRecommend::where('parent_id', 'in', $father)->column('id');
                     if (count($father) > 0) $children = array_merge($children, $father);
                     $layer++;
                 }