fix: openapi 产品列表

This commit is contained in:
2025-07-04 10:34:23 +08:00
parent 4942af1fae
commit b892a1346d

View File

@@ -12,6 +12,7 @@ class Product
*/
public function list()
{
$params = request()->get([
'category_id',
'language' => 'zh-cn',
@@ -47,8 +48,8 @@ class Product
->order(['sort' => 'asc', 'id' => 'desc'])
->hidden(['category_id'])
->paginate([
'list_row' => $params['size'],
'page' => $params['page']
'list_rows' => $params['size'],
'page' => $params['page']
])
->each(function($item) {
if (!empty($item['cover_image']) && !str_starts_with($item['cover_image'], 'http')) {