...
|
...
|
@@ -193,7 +193,7 @@ class DetailModel |
|
|
|
|
|
if (is_numeric($productSkn)) {
|
|
|
// 调用服务
|
|
|
$sizeInfo = DetailData::sizeInfo($productSkn); var_dump($sizeInfo); exit;
|
|
|
$sizeInfo = DetailData::sizeInfo($productSkn);
|
|
|
|
|
|
// 商品信息
|
|
|
if (isset($sizeInfo['productDescBo']['erpProductId'])) {
|
...
|
...
|
@@ -201,14 +201,16 @@ class DetailModel |
|
|
'title' => '商品信息',
|
|
|
'enTitle' => 'PRODUCT INFO',
|
|
|
'detail' => array(
|
|
|
array('param' => '编号:' . $sizeInfo['productDescBo']['erpProductId']),
|
|
|
array('param' => '颜色:' . $sizeInfo['productDescBo']['colorName']),
|
|
|
'list' => array(
|
|
|
array('param' => '编号:' . $sizeInfo['productDescBo']['erpProductId']),
|
|
|
array('param' => '颜色:' . $sizeInfo['productDescBo']['colorName']),
|
|
|
)
|
|
|
),
|
|
|
);
|
|
|
}
|
|
|
if (!empty($sizeInfo['productDescBo']['standardBos'])) {
|
|
|
foreach ($sizeInfo['productDescBo']['standardBos'] as $value) {
|
|
|
$result['goodsDescription']['detail'][] = $value['standardName'] . ':' . $value['standardVal'];
|
|
|
$result['goodsDescription']['detail']['list'][] = array('param' => $value['standardName'] . ':' . $value['standardVal']);
|
|
|
}
|
|
|
}
|
|
|
if (isset($sizeInfo['phrase'])) {
|
...
|
...
|
@@ -216,28 +218,28 @@ class DetailModel |
|
|
}
|
|
|
|
|
|
// 尺码信息
|
|
|
if (!empty($sizeInfo['productIntroBo']['sizeInfoBo'])) {
|
|
|
if (!empty($sizeInfo['sizeInfoBo'])) {
|
|
|
$result['sizeInfo'] = array(
|
|
|
'title' => '尺码信息',
|
|
|
'enTitle' => 'SIZE INFO',
|
|
|
'detail' => array('list' => array()),
|
|
|
);
|
|
|
$sizeNameList = array(0 => array('param' => '吊牌尺码') ); // 尺码名称
|
|
|
$sizeNameList = array(0 => array('param' => '吊牌尺码')) ; // 尺码名称
|
|
|
$sizeBoGroup = array(); // 尺码按ID分组
|
|
|
foreach ($sizeInfo['productIntroBo']['sizeInfoBo']['sizeAttributeBos'] as $attr) {
|
|
|
$sizeBoGroup[ $attr['id'] ][0] = array('param' => $value['attributeName']);
|
|
|
foreach ($sizeInfo['sizeInfoBo']['sizeAttributeBos'] as $attr) {
|
|
|
$sizeBoGroup[ $attr['id'] ][0] = array('param' => $attr['attributeName']);
|
|
|
}
|
|
|
foreach ($sizeInfo['productIntroBo']['sizeInfoBo']['sizeBoList'] as $value) {
|
|
|
foreach ($sizeInfo['sizeInfoBo']['sizeBoList'] as $value) {
|
|
|
$sizeNameList[] = array('param' => $value['sizeName']);
|
|
|
foreach ($value['sortAttributes'] as $attr) {
|
|
|
$sizeBoGroup[ $attr['id'] ][] = array('param' => $attr['sizeValue']);
|
|
|
$sizeNameList[] = array('param' => $value['sizeName']);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 根据模板页面的显示,按表格一列一列来显示
|
|
|
$result['detail']['list'][0] = $sizeNameList;
|
|
|
$result['sizeInfo']['detail']['list'][0]['params'] = $sizeNameList;
|
|
|
foreach ($sizeBoGroup as $value) {
|
|
|
$result['detail']['list'][] = $value;
|
|
|
$result['sizeInfo']['detail']['list'][]['params'] = $value;
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -250,28 +252,28 @@ class DetailModel |
|
|
);
|
|
|
}
|
|
|
|
|
|
// 模特试穿
|
|
|
// 模特试穿, 竖着输出排列显示
|
|
|
if (!empty($sizeInfo['modelBos'])) {
|
|
|
$result['reference'] = array(
|
|
|
'title' => '模特试穿',
|
|
|
'enTitle' => 'REFERENCE',
|
|
|
'detail' => array('list' => array()),
|
|
|
);
|
|
|
$result['reference']['detail']['list'][0] = array(0 => array('param' => '')); // 头像列表
|
|
|
$result['reference']['detail']['list'][1] = array(0 => array('param' => '模特')); // 模特名字列表
|
|
|
$result['reference']['detail']['list'][2] = array(0 => array('param' => '身高')); // 身高列表
|
|
|
$result['reference']['detail']['list'][3] = array(0 => array('param' => '体重')); // 体重列表
|
|
|
$result['reference']['detail']['list'][4] = array(0 => array('param' => '三围')); // 三围列表
|
|
|
$result['reference']['detail']['list'][5] = array(0 => array('param' => '吊牌尺码')); // 吊牌尺码
|
|
|
$result['reference']['detail']['list'][6] = array(0 => array('param' => '试穿描述')); // 试穿描述
|
|
|
$result['reference']['detail']['list'][0]['params'] = array(0 => array('param' => '')); // 头像列表
|
|
|
$result['reference']['detail']['list'][1]['params'] = array(0 => array('param' => '模特')); // 模特名字列表
|
|
|
$result['reference']['detail']['list'][2]['params'] = array(0 => array('param' => '身高')); // 身高列表
|
|
|
$result['reference']['detail']['list'][3]['params'] = array(0 => array('param' => '体重')); // 体重列表
|
|
|
$result['reference']['detail']['list'][4]['params'] = array(0 => array('param' => '三围')); // 三围列表
|
|
|
$result['reference']['detail']['list'][5]['params'] = array(0 => array('param' => '吊牌尺码')); // 吊牌尺码
|
|
|
$result['reference']['detail']['list'][6]['params'] = array(0 => array('param' => '试穿描述')); // 试穿描述
|
|
|
foreach ($sizeInfo['modelBos'] as $value) {
|
|
|
$result['reference']['detail']['list'][0][] = array('param' => $value['avatar']);
|
|
|
$result['reference']['detail']['list'][1][] = array('param' => $value['modelName']);
|
|
|
$result['reference']['detail']['list'][2][] = array('param' => $value['height']);
|
|
|
$result['reference']['detail']['list'][3][] = array('param' => $value['weight']);
|
|
|
$result['reference']['detail']['list'][4][] = array('param' => $value['vitalStatistics']);
|
|
|
$result['reference']['detail']['list'][5][] = array('param' => $value['fitModelBo']['fit_size']);
|
|
|
$result['reference']['detail']['list'][6][] = array('param' => $value['fitModelBo']['feel']);
|
|
|
$result['reference']['detail']['list'][0]['params'][] = array('param' => $value['avatar']);
|
|
|
$result['reference']['detail']['list'][1]['params'][] = array('param' => $value['modelName']);
|
|
|
$result['reference']['detail']['list'][2]['params'][] = array('param' => $value['height']);
|
|
|
$result['reference']['detail']['list'][3]['params'][] = array('param' => $value['weight']);
|
|
|
$result['reference']['detail']['list'][4]['params'][] = array('param' => $value['vitalStatistics']);
|
|
|
$result['reference']['detail']['list'][5]['params'][] = array('param' => $value['fitModelBo']['fit_size']);
|
|
|
$result['reference']['detail']['list'][6]['params'][] = array('param' => $value['fitModelBo']['feel']);
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -316,7 +318,7 @@ class DetailModel |
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
return $result;
|
|
|
}
|
|
|
|
...
|
...
|
|