|
@@ -199,7 +199,15 @@ class Product extends BaseModel
|
|
|
->where('supplier.is_recycle', '=', 0)
|
|
->where('supplier.is_recycle', '=', 0)
|
|
|
->where($filter)
|
|
->where($filter)
|
|
|
->order($sort)
|
|
->order($sort)
|
|
|
- ->paginate($params);
|
|
|
|
|
|
|
+ ->paginate($params)
|
|
|
|
|
+ ->each(function($item, $k) use($param){
|
|
|
|
|
+ $sku = isset($param['sku'])? $param['sku'] : 0;
|
|
|
|
|
+ $specType = isset($item['spec_type'])? $item['spec_type'] : 0;
|
|
|
|
|
+ if($sku && $specType == 20){
|
|
|
|
|
+ $specData = $this->getManySpecData($item['spec_rel'], $item['sku']);
|
|
|
|
|
+ $item['spec_data'] = $specData;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
// 整理列表数据并返回
|
|
// 整理列表数据并返回
|
|
|
return $this->setProductListData($list, true);
|
|
return $this->setProductListData($list, true);
|
|
|
}
|
|
}
|