|
@@ -27,7 +27,7 @@ class FooterService implements FooterServiceInterface
|
|
|
*/
|
|
|
public function getFooterCategory(array $data): array
|
|
|
{
|
|
|
- $where = [];
|
|
|
+ $where = ['pid' => 0];
|
|
|
if(isset($data['website_name'])){
|
|
|
array_push($where, ['website.website_name','like','%'.$data['website_name'].'%']);
|
|
|
}
|
|
@@ -132,7 +132,6 @@ class FooterService implements FooterServiceInterface
|
|
|
return Result::error("该底部导航不存在!");
|
|
|
}
|
|
|
if(empty($data['website_id'])){
|
|
|
- $web = Website::select('website_name','id')->get();
|
|
|
$footer_category = FooterCategory::where('footer_category.id',$data['id'])
|
|
|
->leftJoin("website","website.id","footer_category.website_id")
|
|
|
->select("footer_category.*","website.website_name","website.id as website_id")
|
|
@@ -144,7 +143,6 @@ class FooterService implements FooterServiceInterface
|
|
|
}
|
|
|
$result = [
|
|
|
'rows'=>$footer_category,
|
|
|
- 'web'=>$web
|
|
|
];
|
|
|
}else{
|
|
|
$all_categories = FooterCategory::where('website_id',$data['website_id'])->where('id','!=',$data['id'])->pluck('name')->toArray();
|