Browse Source

修改c端接口:路由匹配

15313670163 4 months ago
parent
commit
926d00970e
1 changed files with 5 additions and 3 deletions
  1. 5 3
      app/JsonRpc/WebsiteService.php

+ 5 - 3
app/JsonRpc/WebsiteService.php

@@ -2792,9 +2792,11 @@ class WebsiteService implements WebsiteServiceInterface
         if (empty($website)) {
         if (empty($website)) {
             return Result::error("暂无该网站", 0);
             return Result::error("暂无该网站", 0);
         }
         }
-        if (isset($data['pinyin']) && !empty($data['pinyin'])) {
-            $result = WebsiteCategory::where('website_category.website_id', $data['website_id'])
-                ->where('website_category.path', $data['pinyin'])
+        if (isset($data['pinyin']) &&!empty($data['pinyin'])) {
+            $result = WebsiteCategory::where('website_id',$data['website_id'])
+            ->where('aLIas_pinyin',$data['pinyin'])
+            // $result = WebsiteCategory::where('category_id', $category_id)
+                // ->where('website_category.path', $data['pinyin'])
                 // ->leftJoin('website_category as pc', function ($join) use ($data) {
                 // ->leftJoin('website_category as pc', function ($join) use ($data) {
                 //     $join->on('pc.pid', '=', 'website_category.category_id')
                 //     $join->on('pc.pid', '=', 'website_category.category_id')
                 //         ->where('pc.website_id', '=', $data['website_id']);
                 //         ->where('pc.website_id', '=', $data['website_id']);