|
@@ -52,6 +52,8 @@ class Goods extends Common
|
|
|
|
|
|
// $goods = $service->paginate();
|
|
|
$goods = $service->select_autopage();
|
|
|
+ $goods = collection($goods)->toArray();
|
|
|
+ $goods = list_domain_image($goods,['image']);
|
|
|
|
|
|
$this->success('获取成功', $goods);
|
|
|
}
|
|
@@ -109,7 +111,7 @@ class Goods extends Common
|
|
|
return $goods;
|
|
|
});
|
|
|
|
|
|
- $goods = $service->show()->activity($activity_id)->with(['max_sku_price' => function ($query) { // 计算价格区间用(不知道为啥 with 必须再 show 后面)
|
|
|
+ $goods = $service->field('*,price as pricemin')->show()->activity($activity_id)->with(['max_sku_price' => function ($query) { // 计算价格区间用(不知道为啥 with 必须再 show 后面)
|
|
|
$query->where('status', 'up');
|
|
|
}, 'favorite'])->where('id', $id)->find();
|
|
|
if (!$goods) {
|
|
@@ -123,6 +125,7 @@ class Goods extends Common
|
|
|
$skuPrices = $goods['new_sku_prices'];
|
|
|
$content = $goods['content'];
|
|
|
$goods = $goods->toArray();
|
|
|
+ $goods['image'] = localpath_to_netpath($goods['image']);
|
|
|
$goods['images'] = array_domain_image($goods['images']);
|
|
|
$goods['sku_prices'] = $skuPrices;
|
|
|
$goods['content'] = $content;
|