|
|
@ -24,11 +24,14 @@ class Active extends Controller |
|
|
|
$model = new ActiveMain(); |
|
|
|
$model = new ActiveMain(); |
|
|
|
$list = $model->with('col') |
|
|
|
$list = $model->with('col') |
|
|
|
->where('status', '=', 1) |
|
|
|
->where('status', '=', 1) |
|
|
|
->where('id', $param['active_id'])->find(); |
|
|
|
->where('id', $param['active_id']) |
|
|
|
|
|
|
|
->find(); |
|
|
|
if ($list) { |
|
|
|
if ($list) { |
|
|
|
foreach ($list['col'] as $k => $row) { |
|
|
|
foreach ($list['col'] as $k => $row) { |
|
|
|
$goodsModel = new GoodsModel(); |
|
|
|
$goodsModel = new GoodsModel(); |
|
|
|
$goods_list = $goodsModel->getListByIdsFromApi(explode(',', $row['col_goods_ids'])); |
|
|
|
$goods_list = $goodsModel->getListByIdsFromApi(explode(',', $row['col_goods_ids'])); |
|
|
|
|
|
|
|
// 隐藏冗余的属性 |
|
|
|
|
|
|
|
$goods_list->hidden(GoodsModel::getHidden(['content', 'goods_images', 'images'])); |
|
|
|
$list['col'][$k]['goods_list'] = $goods_list; |
|
|
|
$list['col'][$k]['goods_list'] = $goods_list; |
|
|
|
} |
|
|
|
} |
|
|
|
return $this->renderSuccess($list->toArray()); |
|
|
|
return $this->renderSuccess($list->toArray()); |
|
|
|