Showing
1 changed file
with
8 additions
and
8 deletions
@@ -191,19 +191,19 @@ class HelperSearch | @@ -191,19 +191,19 @@ class HelperSearch | ||
191 | $isSale = false; | 191 | $isSale = false; |
192 | } | 192 | } |
193 | $gender = 0; | 193 | $gender = 0; |
194 | - if (isset(self::$options['gender'])) { | ||
195 | - $genderArr = explode(',', self::$options['gender']); | 194 | + if (isset(self::$params['gender'])) { |
195 | + $genderArr = explode(',', self::$params['gender']); | ||
196 | $gender = $genderArr[0]; | 196 | $gender = $genderArr[0]; |
197 | } | 197 | } |
198 | foreach($val['goods_list'] as $k => $v){ | 198 | foreach($val['goods_list'] as $k => $v){ |
199 | $goods_list[$k]['url'] = Helpers::getUrlBySkc($val['product_id'], $v['goods_id'], $val['cn_alphabet']); | 199 | $goods_list[$k]['url'] = Helpers::getUrlBySkc($val['product_id'], $v['goods_id'], $val['cn_alphabet']); |
200 | - //女封 | ||
201 | - if (isset($v['cover_1']) && $gender == 1) { | ||
202 | - $val['default_images'] = $v['images_url']; | ||
203 | - } | ||
204 | //男封 | 200 | //男封 |
205 | - if (isset($v['cover_2']) && $gender == 2) { | ||
206 | - $val['default_images'] = $v['images_url']; | 201 | + if (isset($v['cover_1']) && !empty($v['cover_1']) && $gender == 1) { |
202 | + $val['default_images'] = $v['cover_1']; | ||
203 | + } | ||
204 | + //女封 | ||
205 | + if (isset($v['cover_2']) && !empty($v['cover_2']) && $gender == 2) { | ||
206 | + $val['default_images'] = $v['cover_2']; | ||
207 | } | 207 | } |
208 | //筛选符合颜色条件的封面图片 | 208 | //筛选符合颜色条件的封面图片 |
209 | if (isset($params['color']) && $params['color'] == $v['color_id']) { | 209 | if (isset($params['color']) && $params['color'] == $v['color_id']) { |
-
Please register or login to post a comment