瀏覽代碼

获取导航栏目的seo

15313670163 2 月之前
父節點
當前提交
c8d4a4fe23
共有 3 個文件被更改,包括 28 次插入1 次删除
  1. 27 1
      app/JsonRpc/WebsiteService.php
  2. 1 0
      app/JsonRpc/WebsiteServiceInterface.php
  3. 0 0
      runtime/container/scan.cache

+ 27 - 1
app/JsonRpc/WebsiteService.php

@@ -1451,6 +1451,32 @@ class WebsiteService implements WebsiteServiceInterface
         }
         return Result::success($result);
     }
-    
+    /**
+     * 获取网站栏目seo
+     * @param array $data
+     * @return array
+     */
+    public function getWebsiteCategoryHead(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); 
+            }
+        }else{
+            return Result::error("参数错误",0);
+        }
+        if (isset($data['catid']) && !empty($data['catid'])) {
+            $fcatid = WebsiteCategory::where('website_id',$data['website_id'])->where('category_id',$data['catid'])->first();
+            if (empty($fcatid)) {
+                return Result::error("导航id错误",0);
+            }
+            $result = Category::where('id',$data['catid'])->first();
+        }
+        if (empty($result)) {
+            return Result::error("暂无导航",0);
+        }
+        return Result::success($result);
+    }
     
 }

+ 1 - 0
app/JsonRpc/WebsiteServiceInterface.php

@@ -88,4 +88,5 @@ interface WebsiteServiceInterface
     public function getWebsiteFooterCategoryList(array $data): array;
     public function getWebsiteFooterCategoryInfo(array $data): array;
     public function selectWebsiteCategory(array $data): array;
+    public function getWebsiteCategoryHead(array $data): array;
 }

File diff suppressed because it is too large
+ 0 - 0
runtime/container/scan.cache


Some files were not shown because too many files changed in this diff