diff --git a/app/api/logic/LocalStoreGoodsLogic.php b/app/api/logic/LocalStoreGoodsLogic.php index 3275a232..91cc5ac1 100644 --- a/app/api/logic/LocalStoreGoodsLogic.php +++ b/app/api/logic/LocalStoreGoodsLogic.php @@ -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'];