|
|
@ -47,7 +47,7 @@ class SearchService implements \App\Service\v3\Interfaces\SearchServiceInterface |
|
|
$builder->select(['id', 'store_id', 'cover_img', 'name', 'spec', 'tags', 'original_price', 'price', 'inventory', 'sales as total_sales']); |
|
|
$builder->select(['id', 'store_id', 'cover_img', 'name', 'spec', 'tags', 'original_price', 'price', 'inventory', 'sales as total_sales']); |
|
|
$paginate = $builder->paginate($params['pagesize']); |
|
|
$paginate = $builder->paginate($params['pagesize']); |
|
|
$goods = $paginate->toArray(); |
|
|
$goods = $paginate->toArray(); |
|
|
return ['has_more_pages' => $paginate->hasMorePages(), 'goods' => $goods]; |
|
|
|
|
|
|
|
|
return ['has_more_pages' => $paginate->hasMorePages(), 'goods' => $goods['data']]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function doForStores($params) |
|
|
public function doForStores($params) |
|
|
@ -86,7 +86,7 @@ class SearchService implements \App\Service\v3\Interfaces\SearchServiceInterface |
|
|
$builder->select(['id', 'logo', 'name']); |
|
|
$builder->select(['id', 'logo', 'name']); |
|
|
$paginate = $builder->paginate($params['pagesize']); |
|
|
$paginate = $builder->paginate($params['pagesize']); |
|
|
$stores = $paginate->toArray(); |
|
|
$stores = $paginate->toArray(); |
|
|
return ['has_more_pages' => $paginate->hasMorePages(), 'stores' => $stores]; |
|
|
|
|
|
|
|
|
return ['has_more_pages' => $paginate->hasMorePages(), 'stores' => $stores['data']]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function getHotKeywords($type) |
|
|
public function getHotKeywords($type) |
|
|
|