|
@@ -1335,10 +1335,14 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
*/
|
|
|
public function getWebsiteFootInfo(array $data): array
|
|
|
{
|
|
|
- if (isset($data['website_id']) && !empty($data['website_id'])) {
|
|
|
- $website = Website::where('id', $data['website_id'])->where('status', 1)->first();
|
|
|
- if (empty($website)) {
|
|
|
- return Result::error("找不到网站", 0);
|
|
|
+
|
|
|
+ if(isset($data['website_id']) && !empty($data['website_id'])){
|
|
|
+ $website_head = Website::where('id',$data['website_id'])
|
|
|
+ ->where('status',1)
|
|
|
+ ->select('id', 'website_name', 'logo', 'title', 'keywords', 'description', 'suffix', 'website_url')
|
|
|
+ ->first();
|
|
|
+ if (empty($website_head)) {
|
|
|
+ return Result::error("找不到网站",0);
|
|
|
}
|
|
|
} else {
|
|
|
return Result::error("参数错误", 0);
|
|
@@ -1349,15 +1353,13 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
if (empty($website_foot)) {
|
|
|
return Result::error("暂无底部基础信息", 0);
|
|
|
}
|
|
|
- if (empty($website_head)) {
|
|
|
- return Result::error("暂无头部基础信息", 0);
|
|
|
- }
|
|
|
$website_head['website_url'] = $website_head['website_url'] ? json_decode($website_head['website_url']) : [];
|
|
|
$result = [
|
|
|
'website_foot' => $website_foot,
|
|
|
'website_head' => $website_head,
|
|
|
];
|
|
|
return Result::success($result);
|
|
|
+
|
|
|
}
|
|
|
/**
|
|
|
* 获取网站底部导航
|