Browse Source

Merge branch 'web_sannong_fr' into dev

15313670163 1 month ago
parent
commit
cf0de5a510
1 changed files with 9 additions and 6 deletions
  1. 9 6
      app/JsonRpc/WebsiteService.php

+ 9 - 6
app/JsonRpc/WebsiteService.php

@@ -1271,17 +1271,19 @@ 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);
         }
         $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','suffix','website_url')->first();
         if (empty($website_foot)) {
             return Result::error("暂无底部基础信息", 0);
         }
@@ -1294,6 +1296,7 @@ class WebsiteService implements WebsiteServiceInterface
             'website_head' => $website_head,
         ];
         return Result::success($result);
+        
     }
     /**
      * 获取网站底部导航