...
|
...
|
@@ -25,13 +25,13 @@ class DetailModel |
|
|
* @param int $uid 当前登录用户ID, 未登录为0
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function getBaseInfo($productId, $goodsId, $uid)
|
|
|
public static function getBaseInfo($productId, $goodsId, $uid, $vipLevel)
|
|
|
{
|
|
|
$result = array();
|
|
|
|
|
|
if (is_numeric($productId) && is_numeric($goodsId)) {
|
|
|
// 调用服务
|
|
|
$baseInfo = DetailData::baseInfo($productId, $uid); var_dump($baseInfo);
|
|
|
$baseInfo = DetailData::baseInfo($productId, $uid);
|
|
|
|
|
|
// 判断商品是否在架
|
|
|
if (empty($baseInfo['status'])) {
|
...
|
...
|
@@ -42,6 +42,11 @@ class DetailModel |
|
|
if (isset($baseInfo['productName'])) {
|
|
|
$result['goodsName'] = $baseInfo['productName'];
|
|
|
}
|
|
|
|
|
|
// 商品促销短语
|
|
|
if (!empty($baseInfo['salesPhrase'])) {
|
|
|
$result['goodsSubtitle'] = $baseInfo['salesPhrase'];
|
|
|
}
|
|
|
|
|
|
// 商品标签
|
|
|
if (!empty($baseInfo['productTagBoList'])) {
|
...
|
...
|
@@ -83,7 +88,7 @@ class DetailModel |
|
|
foreach ($baseInfo['productPriceBo']['vipPrices'] as $value) {
|
|
|
$build['level'] = $value['vipLevel'];
|
|
|
$build['text'] = $value['vipPrice'];
|
|
|
$build['currentLevel'] = false;
|
|
|
$build['currentLevel'] = ($value['vipLevel'] == $vipLevel) ? true : false;
|
|
|
$result['vipLevel']['list'][] = $build;
|
|
|
}
|
|
|
}
|
...
|
...
|
|