|
@@ -2132,7 +2132,26 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
// $result = [];
|
|
|
return Result::success($category);
|
|
|
}
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 获取网站栏目信息
|
|
|
+ * @param array $data
|
|
|
+ */
|
|
|
+ public function getWebsiteFootAll(array $data): array
|
|
|
+ {
|
|
|
+ $website = Website::where('id',$data['website_id'])->where('status',1)->first();
|
|
|
+ if (empty($website)) {
|
|
|
+ return Result::error("暂无该网站",0);
|
|
|
+ }
|
|
|
+ $result['foot_cate'] = FooterCategory::where('website_id',$data['website_id'])->get()->all();
|
|
|
+ $result['link_img'] = Link::where('website_id',$data['website_id'])->where('type',2)->where('status',1)->limit($data['link_imgnum'])->orderBy('sort')->get()->all();
|
|
|
+ $result['link_text'] = Link::where('website_id',$data['website_id'])->where('type',1)->where('status',1)->limit($data['link_textnum'])->orderBy('sort')->get()->all();
|
|
|
+ $result['link_foot'] = Link::where('website_id',$data['website_id'])->where('type',3)->where('status',1)->limit($data['link_footnum'])->orderBy('sort')->get()->all();
|
|
|
+ $result['foot_info'] = WebsiteTemplateInfo::where('website_id',$data['website_id'])->where('status',2)->first();
|
|
|
+ if(empty($result)){
|
|
|
+ return Result::error("暂无此网站信息",0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|