正在显示
1 个修改的文件
包含
7 行增加
和
3 行删除
| @@ -313,9 +313,13 @@ class BTemplateLogic extends BaseLogic | @@ -313,9 +313,13 @@ class BTemplateLogic extends BaseLogic | ||
| 313 | ] | 313 | ] |
| 314 | ]; | 314 | ]; |
| 315 | //产品,新闻,博客,一级分类数据 | 315 | //产品,新闻,博客,一级分类数据 |
| 316 | - $productCategory = Category::where("pid",0)->get(); | ||
| 317 | - $newCategory = NewsCategory::where("pid",0)->get(); | ||
| 318 | - $blogCategory = BlogCategory::where("pid",0)->get(); | 316 | + $map = [ |
| 317 | + 'pid'=>0, | ||
| 318 | + 'project_id'=>$this->user['project_id'] | ||
| 319 | + ]; | ||
| 320 | + $productCategory = Category::where($map)->get(); | ||
| 321 | + $newCategory = NewsCategory::where($map)->get(); | ||
| 322 | + $blogCategory = BlogCategory::where($map)->get(); | ||
| 319 | if (!empty($productCategory)){ | 323 | if (!empty($productCategory)){ |
| 320 | foreach ($productCategory as $item){ | 324 | foreach ($productCategory as $item){ |
| 321 | $data["products"]["category"][] =$item; | 325 | $data["products"]["category"][] =$item; |
-
请 注册 或 登录 后发表评论