简单标签使用demo

解决已知bug
This commit is contained in:
2020-04-22 21:32:36 +08:00
parent 5ae9d68948
commit 676c5854cd
12 changed files with 40 additions and 144 deletions

View File

@@ -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 {