...
|
...
|
@@ -31,15 +31,44 @@ class DetailModel |
|
|
|
|
|
if (is_numeric($productId) && is_numeric($goodsId)) {
|
|
|
// 调用服务
|
|
|
$baseInfo = DetailData::baseInfo($productId, $uid);
|
|
|
$baseInfo = DetailData::baseInfo($productId, $uid);
|
|
|
|
|
|
// 判断商品是否在架
|
|
|
if (empty($baseInfo['status'])) {
|
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
// 商品名称
|
|
|
if (isset($baseInfo['productName'])) {
|
|
|
$result['goodsName'] = $baseInfo['productName'];
|
|
|
} else {
|
|
|
return $result;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 商品标签
|
|
|
if (!empty($baseInfo['productTagBoList'])) {
|
|
|
foreach ($baseInfo['productTagBoList'] as $value) {
|
|
|
switch ($value['tagLabel']) {
|
|
|
case 'is_soon_sold_out': // 即将售磬
|
|
|
$result['tags']['is_soon_sold_out'] = true;
|
|
|
break;
|
|
|
case 'is_new': // 新品
|
|
|
$result['tags']['is_new'] = true;
|
|
|
break;
|
|
|
case 'is_discount': // 在售
|
|
|
$result['tags']['is_discount'] = true;
|
|
|
break;
|
|
|
case 'is_limited': // 限量
|
|
|
$result['tags']['is_limited'] = true;
|
|
|
break;
|
|
|
case 'is_yohood': // YOHOOD
|
|
|
$result['tags']['is_yohood'] = true;
|
|
|
break;
|
|
|
case 'is_advance': // 再到着
|
|
|
$result['tags']['is_advance'] = true;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 商品价格
|
|
|
if (isset($baseInfo['productPriceBo'])) {
|
|
|
$result['goodsPrice'] = array();
|
...
|
...
|
@@ -176,6 +205,7 @@ class DetailModel |
|
|
|
|
|
// 底部简介的URL链接
|
|
|
$result['introUrl'] = Helpers::url('/product/intro_' . $baseInfo['erpProductId'] . '/' . $baseInfo['cnAlphabet'] . '.html');
|
|
|
$result['id'] = $productId;
|
|
|
}
|
|
|
|
|
|
return $result;
|
...
|
...
|
|