Przeglądaj źródła

修改封装处理商品的路由问题

15313670163 4 dni temu
rodzic
commit
663831d978
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      app/JsonRpc/NewsService.php

+ 2 - 1
app/JsonRpc/NewsService.php

@@ -1431,7 +1431,8 @@ class NewsService implements NewsServiceInterface
             $category = WebsiteCategory::where('category_id', $catid)->where('website_id', $data['website_id'])->first();
             if (!empty($category->pid) && $category->pid != 0) {
                 $level = json_decode($category->category_arr_id);
-                $pinyin = WebsiteCategory::whereIn('category_id', $level)
+                $pinyin = WebsiteCategory::where('website_id', $data['website_id'])
+                    ->whereIn('category_id', $level)
                     ->orderByRaw('FIELD(category_id, '. implode(',', $level). ')')
                     ->get(['aLIas_pinyin'])
                     ->pluck('aLIas_pinyin')