简单标签使用demo
解决已知bug
This commit is contained in:
@@ -61,6 +61,12 @@ class Content extends Base {
|
||||
|
||||
$category = Category::where('model_id', $this->modelInfo['id'])->column("*", "id");
|
||||
|
||||
//当前栏目
|
||||
$cate = isset($category[$param['id']]) ? $category[$param['id']] : [];
|
||||
if(empty($cate)){
|
||||
return $this->error("当前栏目不能为空或无此栏目!");
|
||||
}
|
||||
|
||||
$ids = (new \sent\tree\Tree())->getChilds($category, (int) $param['id']);
|
||||
array_push($ids, (int) $param['id']);
|
||||
|
||||
@@ -71,8 +77,6 @@ class Content extends Base {
|
||||
|
||||
$list = $this->model->where($map)->order($order)->paginate($this->request->pageConfig);
|
||||
|
||||
//当前栏目
|
||||
$cate = $category[$param['id']];
|
||||
if (isset($cate['template_lists']) && $cate['template_lists']) {
|
||||
$teamplate = 'front@content/' . $this->modelInfo['name'] . '/' . $cate['template_lists'];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user