|
@@ -37,7 +37,6 @@ class DetailModel |
|
@@ -37,7 +37,6 @@ class DetailModel |
37
|
// if (empty($baseInfo['status'])) {
|
37
|
// if (empty($baseInfo['status'])) {
|
38
|
// return $result;
|
38
|
// return $result;
|
39
|
// }
|
39
|
// }
|
40
|
-
|
|
|
41
|
// 商品名称
|
40
|
// 商品名称
|
42
|
if (isset($baseInfo['productName'])) {
|
41
|
if (isset($baseInfo['productName'])) {
|
43
|
$result['goodsName'] = $baseInfo['productName'];
|
42
|
$result['goodsName'] = $baseInfo['productName'];
|
|
@@ -191,7 +190,7 @@ class DetailModel |
|
@@ -191,7 +190,7 @@ class DetailModel |
191
|
// }
|
190
|
// }
|
192
|
// }
|
191
|
// }
|
193
|
}
|
192
|
}
|
194
|
-
|
193
|
+
|
195
|
// 商品图: 多个
|
194
|
// 商品图: 多个
|
196
|
if (isset($goodsGroup[1])) {
|
195
|
if (isset($goodsGroup[1])) {
|
197
|
foreach ($goodsGroup as $value) {
|
196
|
foreach ($goodsGroup as $value) {
|
|
@@ -251,11 +250,11 @@ class DetailModel |
|
@@ -251,11 +250,11 @@ class DetailModel |
251
|
*/
|
250
|
*/
|
252
|
public static function getSizeInfo($productSkn)
|
251
|
public static function getSizeInfo($productSkn)
|
253
|
{
|
252
|
{
|
254
|
- $result = array();
|
253
|
+ $result = array();
|
255
|
|
254
|
|
256
|
if (is_numeric($productSkn)) {
|
255
|
if (is_numeric($productSkn)) {
|
257
|
// 调用服务
|
256
|
// 调用服务
|
258
|
- $sizeInfo = DetailData::sizeInfo($productSkn);
|
257
|
+ $sizeInfo = DetailData::sizeInfo($productSkn);
|
259
|
|
258
|
|
260
|
// 商品信息
|
259
|
// 商品信息
|
261
|
if (isset($sizeInfo['productDescBo']['erpProductId'])) {
|
260
|
if (isset($sizeInfo['productDescBo']['erpProductId'])) {
|
|
@@ -311,7 +310,7 @@ class DetailModel |
|
@@ -311,7 +310,7 @@ class DetailModel |
311
|
|
310
|
|
312
|
$referenceList = array();
|
311
|
$referenceList = array();
|
313
|
// 判断是否显示参考尺码
|
312
|
// 判断是否显示参考尺码
|
314
|
- $showReference = !empty($sizeInfo['sizeInfoBo']['sizeBoList'][0]['referenceSize']) && ($sizeInfo['sizeInfoBo']['sizeBoList'][0]['referenceSize']['gender'] == $gender || $sizeInfo['sizeInfoBo']['sizeBoList'][0]['referenceSize']['gender'] == 3);
|
313
|
+ $showReference = $boyReference || $girlReference;
|
315
|
if ($showReference) {
|
314
|
if ($showReference) {
|
316
|
$referenceList[0] = array('param' => $referenceName);
|
315
|
$referenceList[0] = array('param' => $referenceName);
|
317
|
}
|
316
|
}
|
|
@@ -326,9 +325,16 @@ class DetailModel |
|
@@ -326,9 +325,16 @@ class DetailModel |
326
|
foreach ($sizeInfo['sizeInfoBo']['sizeBoList'] as $value) {
|
325
|
foreach ($sizeInfo['sizeInfoBo']['sizeBoList'] as $value) {
|
327
|
$item = array();
|
326
|
$item = array();
|
328
|
$sizeNameList[] = array('param' => $value['sizeName']);
|
327
|
$sizeNameList[] = array('param' => $value['sizeName']);
|
329
|
- if (!empty($value['referenceSize']['gender']) && ($value['referenceSize']['gender'] == $gender || $value['referenceSize']['gender'] == 3)) {
|
|
|
330
|
- $referenceList[] = array('param' => empty($value['referenceSize']['referenceName']) ? ' ' : $value['referenceSize']['referenceName']);
|
328
|
+// if (!empty($value['referenceSize']['gender']) && ($value['referenceSize']['gender'] == $gender || $value['referenceSize']['gender'] == 3)) {
|
|
|
329
|
+// $referenceList[] = array('param' => empty($value['referenceSize']['referenceName']) ? ' ' : $value['referenceSize']['referenceName']);
|
|
|
330
|
+// }
|
|
|
331
|
+
|
|
|
332
|
+ if ($boyReference && ($gender == 1 || $gender == 3)) {
|
|
|
333
|
+ $referenceList[] = array('param' => empty($value['boyReferSize']['referenceName']) ? ' ' : $value['boyReferSize']['referenceName']);
|
|
|
334
|
+ } elseif ($girlReference && ($gender == 2 || $gender == 3)) {
|
|
|
335
|
+ $referenceList[] = array('param' => empty($value['girlReferSize']['referenceName']) ? ' ' : $value['girlReferSize']['referenceName']);
|
331
|
}
|
336
|
}
|
|
|
337
|
+
|
332
|
foreach ($value['sortAttributes'] as $attr) {
|
338
|
foreach ($value['sortAttributes'] as $attr) {
|
333
|
$sizeBoGroup[$attr['id']][] = array('param' => empty($attr['sizeValue']) ? ' ' : $attr['sizeValue']);
|
339
|
$sizeBoGroup[$attr['id']][] = array('param' => empty($attr['sizeValue']) ? ' ' : $attr['sizeValue']);
|
334
|
}
|
340
|
}
|
|
@@ -345,7 +351,6 @@ class DetailModel |
|
@@ -345,7 +351,6 @@ class DetailModel |
345
|
} else {
|
351
|
} else {
|
346
|
$result['sizeInfo']['detail']['list'][0]['params'] = array(0 => array('param' => ''));
|
352
|
$result['sizeInfo']['detail']['list'][0]['params'] = array(0 => array('param' => ''));
|
347
|
}
|
353
|
}
|
348
|
-
|
|
|
349
|
}
|
354
|
}
|
350
|
|
355
|
|
351
|
// 测量方式
|
356
|
// 测量方式
|