瀏覽代碼

feat: 接口调整

xiansin 2 年之前
父節點
當前提交
aab2140457
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      server/app/Http/Controllers/V1/ProductController.php

+ 1 - 1
server/app/Http/Controllers/V1/ProductController.php

@@ -49,7 +49,7 @@ class ProductController extends Controller
         $ids = request()->input('ids','');
         $ids = request()->input('ids','');
         $offset = ($page - 1) * $limit;
         $offset = ($page - 1) * $limit;
 
 
-        $ids = explode(",",$ids);
+        $ids = array_filter(explode(",",$ids));
 
 
 
 
         $lists = Product::withCount(['viewer'])->where('is_opened', 1)
         $lists = Product::withCount(['viewer'])->where('is_opened', 1)