正在显示
1 个修改的文件
包含
5 行增加
和
2 行删除
| @@ -139,11 +139,14 @@ class IndexController extends BaseController | @@ -139,11 +139,14 @@ 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']); |
| 144 | + $image['title'] = $v['title']; | ||
| 145 | + $product_image[] = $image; | ||
| 146 | + } | ||
| 147 | + if(count($product_image) > 7){ | ||
| 148 | + break; | ||
| 145 | } | 149 | } |
| 146 | - $product_image[] = $image; | ||
| 147 | } | 150 | } |
| 148 | $data = [ | 151 | $data = [ |
| 149 | 'title'=>$keywordInfo['title'], | 152 | 'title'=>$keywordInfo['title'], |
-
请 注册 或 登录 后发表评论