Parcourir la source

获取底部所有信息

15313670163 il y a 4 semaines
Parent
commit
e62604a199
2 fichiers modifiés avec 21 ajouts et 1 suppressions
  1. 20 1
      app/JsonRpc/WebsiteService.php
  2. 1 0
      app/JsonRpc/WebsiteServiceInterface.php

+ 20 - 1
app/JsonRpc/WebsiteService.php

@@ -2055,7 +2055,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);
+    }
 
 
 }

+ 1 - 0
app/JsonRpc/WebsiteServiceInterface.php

@@ -111,4 +111,5 @@ interface WebsiteServiceInterface
     // --网站底部基础信息-----------fr----------------------end
     
     public function getWebsiteParentCategory(array $data): array;
+    public function getWebsiteFootAll(array $data): array;
 }