|
@@ -1264,22 +1264,17 @@ class WebsiteService implements WebsiteServiceInterface
|
|
public function getWebsiteFootInfo(array $data): array
|
|
public function getWebsiteFootInfo(array $data): array
|
|
{
|
|
{
|
|
if(isset($data['website_id']) && !empty($data['website_id'])){
|
|
if(isset($data['website_id']) && !empty($data['website_id'])){
|
|
- $website = Website::where('id',$data['website_id'])->where('status',1)->first();
|
|
|
|
- if (empty($website)) {
|
|
|
|
|
|
+ $website_head = Website::where('id',$data['website_id'])->where('status',1)->first();
|
|
|
|
+ if (empty($website_head)) {
|
|
return Result::error("找不到网站",0);
|
|
return Result::error("找不到网站",0);
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
return Result::error("参数错误",0);
|
|
return Result::error("参数错误",0);
|
|
}
|
|
}
|
|
$website_foot = WebsiteTemplateInfo::where('website_id',$data['website_id'])->where('status',2)->first();
|
|
$website_foot = WebsiteTemplateInfo::where('website_id',$data['website_id'])->where('status',2)->first();
|
|
- $website_head = Website::where('id',$data['website_id'])
|
|
|
|
- ->select('id','website_name','logo','title','keywords','description')->first();
|
|
|
|
if (empty($website_foot)) {
|
|
if (empty($website_foot)) {
|
|
return Result::error("暂无底部基础信息",0);
|
|
return Result::error("暂无底部基础信息",0);
|
|
}
|
|
}
|
|
- if (empty($website_head)) {
|
|
|
|
- return Result::error("暂无头部基础信息",0);
|
|
|
|
- }
|
|
|
|
$result = [
|
|
$result = [
|
|
'website_foot'=>$website_foot,
|
|
'website_foot'=>$website_foot,
|
|
'website_head'=>$website_head
|
|
'website_head'=>$website_head
|