我也不知道自己调了什么
This commit is contained in:
@@ -19,7 +19,7 @@ class CategoryController extends Controller
|
||||
$parent = getTopCate($category->id);
|
||||
|
||||
$template = array_flip(config('haai.category'));
|
||||
if (isset($template[$category->id])) {
|
||||
if (isset($template[$category->id]) && !in_array($category->id, config('haai.no_list'))) {
|
||||
return view('category.' . $template[$category->id], compact('category', 'parent'));
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class CategoryController extends Controller
|
||||
$take = 16;
|
||||
$template = 'category.persons';
|
||||
}
|
||||
|
||||
|
||||
$articles = Article::where('category_id', $category->id)
|
||||
->where('status', 1)
|
||||
->latest('sort')
|
||||
@@ -46,6 +46,10 @@ class CategoryController extends Controller
|
||||
|
||||
$parent = getTopCate($category->id);
|
||||
|
||||
if (in_array($category->id, [55, 54]) && $category->children->isEmpty()) {
|
||||
$parent = $category->parent;
|
||||
}
|
||||
|
||||
return view($template, compact('category', 'parent', 'articles'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user