mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-23 20:00:27 +08:00
parent
e35c55a03f
commit
70682f1ebb
@ -251,8 +251,11 @@ class Course extends Service
|
|||||||
|
|
||||||
$list = [];
|
$list = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 没有二级分类的不显示
|
||||||
|
*/
|
||||||
foreach ($allCategories as $category) {
|
foreach ($allCategories as $category) {
|
||||||
if ($category->level == 1) {
|
if ($category->level == 1 && $category->child_count > 0) {
|
||||||
$list[$category->id] = [
|
$list[$category->id] = [
|
||||||
'name' => $category->name,
|
'name' => $category->name,
|
||||||
'value' => $category->id,
|
'value' => $category->id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user