|
...
|
...
|
@@ -313,9 +313,13 @@ class BTemplateLogic extends BaseLogic |
|
|
|
]
|
|
|
|
];
|
|
|
|
//产品,新闻,博客,一级分类数据
|
|
|
|
$productCategory = Category::where("pid",0)->get();
|
|
|
|
$newCategory = NewsCategory::where("pid",0)->get();
|
|
|
|
$blogCategory = BlogCategory::where("pid",0)->get();
|
|
|
|
$map = [
|
|
|
|
'pid'=>0,
|
|
|
|
'project_id'=>$this->user['project_id']
|
|
|
|
];
|
|
|
|
$productCategory = Category::where($map)->get();
|
|
|
|
$newCategory = NewsCategory::where($map)->get();
|
|
|
|
$blogCategory = BlogCategory::where($map)->get();
|
|
|
|
if (!empty($productCategory)){
|
|
|
|
foreach ($productCategory as $item){
|
|
|
|
$data["products"]["category"][] =$item;
|
...
|
...
|
|