|
@@ -152,7 +152,7 @@ class Goods extends Common
|
|
|
return $goods;
|
|
|
});
|
|
|
|
|
|
- $goods = $service->field('*,price as pricemin')->show()->activity($activity_id)
|
|
|
+ $goods = $service->show()->activity($activity_id)
|
|
|
->with(
|
|
|
[
|
|
|
/* 'max_sku_price' => function ($query) { // 计算价格区间用(不知道为啥 with 必须再 show 后面)
|
|
@@ -163,6 +163,8 @@ class Goods extends Common
|
|
|
$this->error(__('No Results were found'));
|
|
|
}
|
|
|
|
|
|
+ //如果传过来规格id,那主图,price的第零个,original_goods_price的第零个 都需要跟着变
|
|
|
+
|
|
|
// 添加浏览记录
|
|
|
GoodsLog::addView($user, $goods);
|
|
|
|
|
@@ -170,9 +172,11 @@ 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']);//轮播图
|
|
|
$skuPrices = list_domain_image($skuPrices->toArray(),['image']);//规格图
|
|
|
+
|
|
|
$goods['sku_prices'] = $skuPrices;
|
|
|
$goods['content'] = $content;
|
|
|
unset($goods['new_sku_prices']);
|