Browse Source

获取网站顶部信息

15313670163 3 tuần trước cách đây
mục cha
commit
088de2c996
2 tập tin đã thay đổi với 13 bổ sung0 xóa
  1. 12 0
      app/JsonRpc/WebsiteService.php
  2. 1 0
      app/JsonRpc/WebsiteServiceInterface.php

+ 12 - 0
app/JsonRpc/WebsiteService.php

@@ -2076,6 +2076,18 @@ class WebsiteService implements WebsiteServiceInterface
         }
         return Result::success($result);
     }
+    /**
+     * 获取网站顶部信息
+     * @param array $data
+     */
+    public function getWebsiteHead(array $data): array
+    {
+        $result = Website::where('id',$data['website_id'])->where('status',1)->select('website_name','logo')->first();
+        if (empty($result)) {
+            return Result::error("暂无该网站",0); 
+        }
+        return Result::success($result);
+    }
 
 
 }

+ 1 - 0
app/JsonRpc/WebsiteServiceInterface.php

@@ -112,4 +112,5 @@ interface WebsiteServiceInterface
     
     public function getWebsiteParentCategory(array $data): array;
     public function getWebsiteFootAll(array $data): array;
+    public function getWebsiteHead(array $data): array;
 }