fix: openapi 产品列表
This commit is contained in:
@@ -12,6 +12,7 @@ class Product
|
|||||||
*/
|
*/
|
||||||
public function list()
|
public function list()
|
||||||
{
|
{
|
||||||
|
|
||||||
$params = request()->get([
|
$params = request()->get([
|
||||||
'category_id',
|
'category_id',
|
||||||
'language' => 'zh-cn',
|
'language' => 'zh-cn',
|
||||||
@@ -47,8 +48,8 @@ class Product
|
|||||||
->order(['sort' => 'asc', 'id' => 'desc'])
|
->order(['sort' => 'asc', 'id' => 'desc'])
|
||||||
->hidden(['category_id'])
|
->hidden(['category_id'])
|
||||||
->paginate([
|
->paginate([
|
||||||
'list_row' => $params['size'],
|
'list_rows' => $params['size'],
|
||||||
'page' => $params['page']
|
'page' => $params['page']
|
||||||
])
|
])
|
||||||
->each(function($item) {
|
->each(function($item) {
|
||||||
if (!empty($item['cover_image']) && !str_starts_with($item['cover_image'], 'http')) {
|
if (!empty($item['cover_image']) && !str_starts_with($item['cover_image'], 'http')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user