Kirin 3 năm trước cách đây
mục cha
commit
9d4d117901

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

@@ -18,7 +18,7 @@ class TreeController
                 $father = [$item['id']];
                 $father = [$item['id']];
                 $layer = 1;
                 $layer = 1;
                 while (count($father) && $layer <= 12) {
                 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);
                     if (count($father) > 0) $children = array_merge($children, $father);
                     $layer++;
                     $layer++;
                 }
                 }