Commit f12dfe71 authored by 刘小敏's avatar 刘小敏

增加活动信息

parent fbba693e
...@@ -160,7 +160,7 @@ class Goods extends Common ...@@ -160,7 +160,7 @@ class Goods extends Common
$goods = $service->activity($activity_id)->whereIds($goodsIds)->show()->order('weigh', 'desc')->select(); $goods = $service->activity($activity_id)->whereIds($goodsIds)->show()->order('weigh', 'desc')->select();
$goods = collection($goods)->toArray(); $goods = collection($goods)->toArray();
foreach ($goods as &$gd) { foreach ($goods as &$gd) {
unset($gd['new_sku_prices'], $gd['activity']); unset($gd['new_sku_prices']);
} }
$this->success('获取成功', $goods); $this->success('获取成功', $goods);
} }
...@@ -188,6 +188,7 @@ class Goods extends Common ...@@ -188,6 +188,7 @@ class Goods extends Common
} }
$service = new GoodsService(function ($goods) { $service = new GoodsService(function ($goods) {
$goods->promos = $goods->promos; $goods->promos = $goods->promos;
$goods->activity = $goods->activity;
return $goods; return $goods;
}); });
$goods = $service->activity($activity_id)->whereIds($goodsIds)->show()->order('weigh', 'desc')->paginate(); $goods = $service->activity($activity_id)->whereIds($goodsIds)->show()->order('weigh', 'desc')->paginate();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment