sku完成,订单、商品上下架管理正在搞
This commit is contained in:
@@ -37,6 +37,14 @@ class ProductService extends BaseService
|
||||
*/
|
||||
public function list(): array
|
||||
{
|
||||
$this->with = [
|
||||
'images:id,product_id,url',
|
||||
'mall:id,name,avatar',
|
||||
'user:id,nick_name,avatar',
|
||||
'labels',
|
||||
'classification',
|
||||
'skus:id,product_id,name,cover,price,inventory',
|
||||
];
|
||||
$result = $this->getPageList();
|
||||
foreach ($result['items'] as &$v) {
|
||||
$v['images'] = array_column($v['images'], 'url');
|
||||
|
||||
Reference in New Issue
Block a user