Commit ac0ad9fa by 杨树贤

分类过滤问题

parent c503037d
Showing with 6 additions and 0 deletions
...@@ -15,6 +15,9 @@ class ClassService ...@@ -15,6 +15,9 @@ class ClassService
foreach ($classCache as $key => &$class) { foreach ($classCache as $key => &$class) {
$class = json_decode($class, true); $class = json_decode($class, true);
if (!$class['parent_id']) { if (!$class['parent_id']) {
if (empty($class['class_name_en'])) {
continue;
}
$topClassList[] = $class; $topClassList[] = $class;
} }
} }
...@@ -25,6 +28,9 @@ class ClassService ...@@ -25,6 +28,9 @@ class ClassService
} }
foreach ($topClassList as &$topClass) { foreach ($topClassList as &$topClass) {
if ($topClass['class_id'] == $class['parent_id']) { if ($topClass['class_id'] == $class['parent_id']) {
if (empty($class['class_name_en'])) {
continue;
}
$topClass['children'][] = $class; $topClass['children'][] = $class;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment