Explorar o código

获取网站栏目seo,由于数据库变动修改此接口

15313670163 hai 2 semanas
pai
achega
7229d9b4f7
Modificáronse 1 ficheiros con 3 adicións e 5 borrados
  1. 3 5
      app/JsonRpc/WebsiteService.php

+ 3 - 5
app/JsonRpc/WebsiteService.php

@@ -1473,15 +1473,13 @@ class WebsiteService implements WebsiteServiceInterface
             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();
+            $result = WebsiteCategory::where('website_id',$data['website_id'])->where('category_id',$data['catid'])->first();
         }
         if (empty($result)) {
             return Result::error("暂无导航",0);
         }
+        $result['website_name'] = $website['website_name'] ?? '';
+        $result['suffix'] = $website['suffix'] ?? '';
         return Result::success($result);
     }
      /*