guangInfo goodsGroup release
Showing
1 changed file
with
4 additions
and
2 deletions
@@ -91,7 +91,9 @@ class InfoModel | @@ -91,7 +91,9 @@ class InfoModel | ||
91 | if ($type === 'goods') { | 91 | if ($type === 'goods') { |
92 | $goods = array_merge_recursive($goods, self::goods($con['data'])); | 92 | $goods = array_merge_recursive($goods, self::goods($con['data'])); |
93 | } elseif ($type === 'goodsGroup') { | 93 | } elseif ($type === 'goodsGroup') { |
94 | - $goodsGroup = array_merge_recursive($goodsGroup, self::goodsGroup($con['data'])); | 94 | + foreach (self::goodsGroup($con['data']) as $key => $val) { |
95 | + $goodsGroup = array_merge_recursive($goodsGroup, $val['recos']); | ||
96 | + } | ||
95 | } else { | 97 | } else { |
96 | $other = is_callable("self::$type") ? self::$type($con['data']) : ''; | 98 | $other = is_callable("self::$type") ? self::$type($con['data']) : ''; |
97 | array_push($result['content'], $other); | 99 | array_push($result['content'], $other); |
@@ -103,7 +105,7 @@ class InfoModel | @@ -103,7 +105,7 @@ class InfoModel | ||
103 | $result['content'][]['relatedReco'] = array('recos'=>$goods); | 105 | $result['content'][]['relatedReco'] = array('recos'=>$goods); |
104 | } | 106 | } |
105 | if (!empty($goodsGroup)) { | 107 | if (!empty($goodsGroup)) { |
106 | - $result['content'][]['relatedReco'] = $goodsGroup; | 108 | + $result['content'][]['relatedReco'] = array('recos'=>$goodsGroup); |
107 | } | 109 | } |
108 | //赞、收藏 | 110 | //赞、收藏 |
109 | if (isset($data['baseInfo']) && !empty($data['baseInfo'])) { | 111 | if (isset($data['baseInfo']) && !empty($data['baseInfo'])) { |
-
Please register or login to post a comment