Merge branch 'temp' of http://git.dev.yoho.cn/web/yohobuy.git into temp
Showing
1 changed file
with
4 additions
and
3 deletions
@@ -68,7 +68,7 @@ class InfoModel | @@ -68,7 +68,7 @@ class InfoModel | ||
68 | */ | 68 | */ |
69 | public static function formatInfo($article, $data, $channel, $limit) | 69 | public static function formatInfo($article, $data, $channel, $limit) |
70 | { | 70 | { |
71 | - $result = array(); | 71 | + $result['content'] = $other = array(); |
72 | //推荐商品列表 | 72 | //推荐商品列表 |
73 | $goods = $goodsGroup = array(); | 73 | $goods = $goodsGroup = array(); |
74 | $result['pathNav'] = self::getCenterCrumb($article['article_title'], $channel); | 74 | $result['pathNav'] = self::getCenterCrumb($article['article_title'], $channel); |
@@ -93,13 +93,14 @@ class InfoModel | @@ -93,13 +93,14 @@ class InfoModel | ||
93 | } elseif ($type === 'goodsGroup') { | 93 | } elseif ($type === 'goodsGroup') { |
94 | $goodsGroup = array_merge_recursive($goodsGroup, self::goodsGroup($con['data'])); | 94 | $goodsGroup = array_merge_recursive($goodsGroup, self::goodsGroup($con['data'])); |
95 | } else { | 95 | } else { |
96 | - $result['content'] = is_callable("self::$type") ? self::$type($con['data']) : ''; | 96 | + $other = is_callable("self::$type") ? self::$type($con['data']) : ''; |
97 | + $result['content'] = array_merge_recursive($result['content'], $other); | ||
97 | } | 98 | } |
98 | } | 99 | } |
99 | } | 100 | } |
100 | } | 101 | } |
101 | if (!empty($goods)) { | 102 | if (!empty($goods)) { |
102 | - $result['content'][] = array('relatedReco'=>array('recos'=>$goods)); | 103 | + $result['content']['relatedReco'] = array('recos'=>$goods); |
103 | } | 104 | } |
104 | if (!empty($goodsGroup)) { | 105 | if (!empty($goodsGroup)) { |
105 | $result['content']['relatedReco'] = $goodsGroup; | 106 | $result['content']['relatedReco'] = $goodsGroup; |
-
Please register or login to post a comment