|
@@ -25,13 +25,13 @@ class DetailModel |
|
@@ -25,13 +25,13 @@ class DetailModel |
25
|
* @param int $uid 当前登录用户ID, 未登录为0
|
25
|
* @param int $uid 当前登录用户ID, 未登录为0
|
26
|
* @return array
|
26
|
* @return array
|
27
|
*/
|
27
|
*/
|
28
|
- public static function getBaseInfo($productId, $goodsId, $uid)
|
28
|
+ public static function getBaseInfo($productId, $goodsId, $uid, $vipLevel)
|
29
|
{
|
29
|
{
|
30
|
$result = array();
|
30
|
$result = array();
|
31
|
|
31
|
|
32
|
if (is_numeric($productId) && is_numeric($goodsId)) {
|
32
|
if (is_numeric($productId) && is_numeric($goodsId)) {
|
33
|
// 调用服务
|
33
|
// 调用服务
|
34
|
- $baseInfo = DetailData::baseInfo($productId, $uid); var_dump($baseInfo);
|
34
|
+ $baseInfo = DetailData::baseInfo($productId, $uid);
|
35
|
|
35
|
|
36
|
// 判断商品是否在架
|
36
|
// 判断商品是否在架
|
37
|
if (empty($baseInfo['status'])) {
|
37
|
if (empty($baseInfo['status'])) {
|
|
@@ -42,6 +42,11 @@ class DetailModel |
|
@@ -42,6 +42,11 @@ class DetailModel |
42
|
if (isset($baseInfo['productName'])) {
|
42
|
if (isset($baseInfo['productName'])) {
|
43
|
$result['goodsName'] = $baseInfo['productName'];
|
43
|
$result['goodsName'] = $baseInfo['productName'];
|
44
|
}
|
44
|
}
|
|
|
45
|
+
|
|
|
46
|
+ // 商品促销短语
|
|
|
47
|
+ if (!empty($baseInfo['salesPhrase'])) {
|
|
|
48
|
+ $result['goodsSubtitle'] = $baseInfo['salesPhrase'];
|
|
|
49
|
+ }
|
45
|
|
50
|
|
46
|
// 商品标签
|
51
|
// 商品标签
|
47
|
if (!empty($baseInfo['productTagBoList'])) {
|
52
|
if (!empty($baseInfo['productTagBoList'])) {
|
|
@@ -83,7 +88,7 @@ class DetailModel |
|
@@ -83,7 +88,7 @@ class DetailModel |
83
|
foreach ($baseInfo['productPriceBo']['vipPrices'] as $value) {
|
88
|
foreach ($baseInfo['productPriceBo']['vipPrices'] as $value) {
|
84
|
$build['level'] = $value['vipLevel'];
|
89
|
$build['level'] = $value['vipLevel'];
|
85
|
$build['text'] = $value['vipPrice'];
|
90
|
$build['text'] = $value['vipPrice'];
|
86
|
- $build['currentLevel'] = false;
|
91
|
+ $build['currentLevel'] = ($value['vipLevel'] == $vipLevel) ? true : false;
|
87
|
$result['vipLevel']['list'][] = $build;
|
92
|
$result['vipLevel']['list'][] = $build;
|
88
|
}
|
93
|
}
|
89
|
}
|
94
|
}
|