Authored by hf

code review by hf: fixes bug refs YW-1720

@@ -186,7 +186,7 @@ class DetailModel @@ -186,7 +186,7 @@ class DetailModel
186 // 商品的尺码列表 186 // 商品的尺码列表
187 if (isset($value['goodsSizeBoList'])) { 187 if (isset($value['goodsSizeBoList'])) {
188 foreach ($value['goodsSizeBoList'] as $size) { 188 foreach ($value['goodsSizeBoList'] as $size) {
189 - $sizeList[$value['colorId']][] = array( 189 + $sizeList[$value['productSkc']][] = array(
190 'id' => $size['id'], 190 'id' => $size['id'],
191 'skuId' => $size['goodsSizeSkuId'], 191 'skuId' => $size['goodsSizeSkuId'],
192 'goodsId' => $size['goodsId'], 192 'goodsId' => $size['goodsId'],
@@ -214,9 +214,9 @@ class DetailModel @@ -214,9 +214,9 @@ class DetailModel
214 $thumbImageList[] = array('img' => Helpers::getImageUrl($value['colorImage'], 60, 60)); 214 $thumbImageList[] = array('img' => Helpers::getImageUrl($value['colorImage'], 60, 60));
215 215
216 // 添加尺码对应的各个颜色的库存量 216 // 添加尺码对应的各个颜色的库存量
217 - foreach ($sizeList as $colorId => $sizeArr) { 217 + foreach ($sizeList as $skc => $sizeArr) {
218 foreach ($sizeArr as $key => $value) { 218 foreach ($sizeArr as $key => $value) {
219 - $sizeList[$colorId][$key]['colorNumStr'] = implode('/', array_values($colorStorageGroup[$value['name']])); 219 + $sizeList[$skc][$key]['colorNumStr'] = implode('/', array_values($colorStorageGroup[$value['name']]));
220 } 220 }
221 } 221 }
222 222