소스 검색

获取导航栏目的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;
 }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
runtime/container/scan.cache


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.