商品详情添加规格获取
This commit is contained in:
parent
95f48e9e79
commit
5501a0e18f
@ -226,6 +226,21 @@ class LocalStoreGoodsLogic extends Logic
|
||||
'audit_status' => $get['audit_status']
|
||||
])->find()->toArray();
|
||||
|
||||
// 查找多规格
|
||||
if ($data['is_multiple_spec'] == 1) {
|
||||
$data['item'] = LocalStoreGoodsItem::where([
|
||||
'goods_id' => $get['id']
|
||||
])->field('id, image, spec_value_ids, spec_value_str, price, stock, note')->select();
|
||||
|
||||
$data['spec'] = LocalStoreGoodsSpec::where([
|
||||
'goods_id' => $get['id']
|
||||
])->field('id, name')->select();
|
||||
|
||||
$data['spec_value'] = LocalStoreGoodsSpecValue::where([
|
||||
'goods_id' => $get['id']
|
||||
])->field('id, spec_id, value')->select();
|
||||
}
|
||||
|
||||
if ($data) {
|
||||
foreach ($data['pic'] as &$v) {
|
||||
$v['url'] = Config::get('aliyunoss.domain') . $v['url'];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user