正在显示
2 个修改的文件
包含
2 行增加
和
0 行删除
| @@ -55,6 +55,7 @@ class BlogController extends BaseController | @@ -55,6 +55,7 @@ class BlogController extends BaseController | ||
| 55 | $query = $query->where('project_id',$this->user['project_id']); | 55 | $query = $query->where('project_id',$this->user['project_id']); |
| 56 | if (isset($this->map['category_id']) && !empty($this->map['category_id'])) { | 56 | if (isset($this->map['category_id']) && !empty($this->map['category_id'])) { |
| 57 | $str = []; | 57 | $str = []; |
| 58 | + $str[] = $this->map['category_id']; | ||
| 58 | $this->getAllSub($this->map['category_id'],$str); | 59 | $this->getAllSub($this->map['category_id'],$str); |
| 59 | $query->where(function ($subQuery) use ($str) { | 60 | $query->where(function ($subQuery) use ($str) { |
| 60 | foreach ($str as $v) { | 61 | foreach ($str as $v) { |
| @@ -58,6 +58,7 @@ class NewsController extends BaseController | @@ -58,6 +58,7 @@ class NewsController extends BaseController | ||
| 58 | $query = $query->where('project_id',$this->user['project_id']); | 58 | $query = $query->where('project_id',$this->user['project_id']); |
| 59 | if (isset($this->map['category_id']) && !empty($this->map['category_id'])) { | 59 | if (isset($this->map['category_id']) && !empty($this->map['category_id'])) { |
| 60 | $str = []; | 60 | $str = []; |
| 61 | + $str[] = $this->map['category_id']; | ||
| 61 | $this->getAllSub($this->map['category_id'],$str); | 62 | $this->getAllSub($this->map['category_id'],$str); |
| 62 | $query->where(function ($subQuery) use ($str) { | 63 | $query->where(function ($subQuery) use ($str) { |
| 63 | foreach ($str as $v) { | 64 | foreach ($str as $v) { |
-
请 注册 或 登录 后发表评论