|
@@ -1471,15 +1471,14 @@ class WebsiteService implements WebsiteServiceInterface
|
|
if (empty($website)) {
|
|
if (empty($website)) {
|
|
return Result::error("暂无该网站",0);
|
|
return Result::error("暂无该网站",0);
|
|
}
|
|
}
|
|
- $result = WebsiteCategory::where('website_id',$data['website_id'])->where('category_id',$data['category_id'])->select('category_id','alias')->first();
|
|
|
|
- // return Result::success($category);
|
|
|
|
- if (empty($result)) {
|
|
|
|
- return Result::error("暂无此导航",0);
|
|
|
|
- }
|
|
|
|
- // department_id
|
|
|
|
|
|
+ $category = WebsiteCategory::where('website_id',$data['website_id'])->where('category_id',$data['category_id'])->first();
|
|
|
|
+ if (empty($category)) {
|
|
|
|
+ return Result::error("暂无此导航",0);
|
|
|
|
+ }
|
|
|
|
+ $category['children_count'] = WebsiteCategory::where('website_id',$data['website_id'])->where('pid',$data['category_id'])->count();
|
|
|
|
+ return Result::success($category);
|
|
}else{
|
|
}else{
|
|
return Result::error("参数错误",0);
|
|
return Result::error("参数错误",0);
|
|
}
|
|
}
|
|
- return Result::success($result);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|