作者 lyh

gx

... ... @@ -55,6 +55,7 @@ class BlogController extends BaseController
$query = $query->where('project_id',$this->user['project_id']);
if (isset($this->map['category_id']) && !empty($this->map['category_id'])) {
$str = [];
$str[] = $this->map['category_id'];
$this->getAllSub($this->map['category_id'],$str);
$query->where(function ($subQuery) use ($str) {
foreach ($str as $v) {
... ...
... ... @@ -58,6 +58,7 @@ class NewsController extends BaseController
$query = $query->where('project_id',$this->user['project_id']);
if (isset($this->map['category_id']) && !empty($this->map['category_id'])) {
$str = [];
$str[] = $this->map['category_id'];
$this->getAllSub($this->map['category_id'],$str);
$query->where(function ($subQuery) use ($str) {
foreach ($str as $v) {
... ...