...
|
...
|
@@ -157,8 +157,8 @@ class DetailModel |
|
|
|
|
|
// 商品信息
|
|
|
if (!empty($baseInfo['goodsList'])) {
|
|
|
$colorGroup = array();
|
|
|
$sizeGroup = array();
|
|
|
// $colorGroup = array();
|
|
|
// $sizeGroup = array();
|
|
|
$goodsList = array();
|
|
|
$goodsGroup = array();
|
|
|
$colorId = 0;
|
...
|
...
|
@@ -168,49 +168,44 @@ class DetailModel |
|
|
if (isset($value['goodsImagesList'])) {
|
|
|
foreach ($value['goodsImagesList'] as $goods) {
|
|
|
$goodsList[$goods['goodsId']] = $colorId;
|
|
|
$goodsGroup[$colorId][] = array(
|
|
|
$goodsGroup[] = array(
|
|
|
'goodsId' => $goods['goodsId'],
|
|
|
'img' => $goods['imageUrl'],
|
|
|
);
|
|
|
$colorGroup[$colorId] = array(
|
|
|
'colorId' => $colorId,
|
|
|
'colorName' => $value['colorName'],
|
|
|
'colorImage' => Helpers::getImageUrl($value['colorImage'], 60, 60),
|
|
|
);
|
|
|
// $colorGroup[$colorId] = array(
|
|
|
// 'colorId' => $colorId,
|
|
|
// 'colorName' => $value['colorName'],
|
|
|
// 'colorImage' => Helpers::getImageUrl($value['colorImage'], 60, 60),
|
|
|
// );
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 商品的尺码列表
|
|
|
if (isset($value['goodsSizeBoList'])) {
|
|
|
foreach ($value['goodsSizeBoList'] as $size) {
|
|
|
$sizeGroup[$colorId] = array(
|
|
|
'sizeName' => $size['sizeName'],
|
|
|
'sizeSku' => $size['goodsSizeSkuId'],
|
|
|
'sizeStorage' => $size['goodsSizeStorageNum'],
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
// // 商品的尺码列表
|
|
|
// if (isset($value['goodsSizeBoList'])) {
|
|
|
// foreach ($value['goodsSizeBoList'] as $size) {
|
|
|
// $sizeGroup[$colorId] = array(
|
|
|
// 'sizeName' => $size['sizeName'],
|
|
|
// 'sizeSku' => $size['goodsSizeSkuId'],
|
|
|
// 'sizeStorage' => $size['goodsSizeStorageNum'],
|
|
|
// );
|
|
|
// }
|
|
|
// }
|
|
|
}
|
|
|
|
|
|
// 商品图
|
|
|
$goodsId = intval($goodsId);
|
|
|
if (isset($goodsList[$goodsId])) {
|
|
|
$colorId = $goodsList[$goodsId];
|
|
|
// 多个
|
|
|
if (isset($goodsGroup[$colorId][1])) {
|
|
|
foreach ($goodsGroup[$colorId] as $value) {
|
|
|
$result['bannerTop']['list'][] = array(
|
|
|
'img' => Helpers::getImageUrl($value['img'], 450, 600)
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
// 单个
|
|
|
elseif (isset($goodsGroup[$colorId][0])) {
|
|
|
$result['bannerTop'] = array(
|
|
|
'img' => Helpers::getImageUrl($goodsGroup[$colorId][0]['img'], 450, 600)
|
|
|
|
|
|
// 商品图: 多个
|
|
|
if (isset($goodsGroup[1])) {
|
|
|
foreach ($goodsGroup as $value) {
|
|
|
$result['bannerTop']['list'][] = array(
|
|
|
'img' => Helpers::getImageUrl($value['img'], 450, 600)
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
// 商品图: 单个
|
|
|
elseif (isset($goodsGroup[0])) {
|
|
|
$result['bannerTop'] = array(
|
|
|
'img' => Helpers::getImageUrl($goodsGroup[0]['img'], 450, 600)
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 悬浮的购物车信息
|
...
|
...
|
|