正在显示
1 个修改的文件
包含
5 行增加
和
2 行删除
| @@ -139,12 +139,15 @@ class IndexController extends BaseController | @@ -139,12 +139,15 @@ class IndexController extends BaseController | ||
| 139 | $product_image = []; | 139 | $product_image = []; |
| 140 | foreach ($productList as $k => $v){ | 140 | foreach ($productList as $k => $v){ |
| 141 | $image = []; | 141 | $image = []; |
| 142 | - $image['title'] = $v['title']; | ||
| 143 | if(!empty($v['thumb']) && !empty($v['thumb']['url'])){ | 142 | if(!empty($v['thumb']) && !empty($v['thumb']['url'])){ |
| 144 | $image['image'] = getImageUrl($v['thumb']['url']); | 143 | $image['image'] = getImageUrl($v['thumb']['url']); |
| 145 | - } | 144 | + $image['title'] = $v['title']; |
| 146 | $product_image[] = $image; | 145 | $product_image[] = $image; |
| 147 | } | 146 | } |
| 147 | + if(count($product_image) > 7){ | ||
| 148 | + break; | ||
| 149 | + } | ||
| 150 | + } | ||
| 148 | $data = [ | 151 | $data = [ |
| 149 | 'title'=>$keywordInfo['title'], | 152 | 'title'=>$keywordInfo['title'], |
| 150 | 'keyword_title'=>$keywordInfo['keyword_title'], | 153 | 'keyword_title'=>$keywordInfo['keyword_title'], |
-
请 注册 或 登录 后发表评论