Showing
1 changed file
with
5 additions
and
3 deletions
@@ -166,10 +166,12 @@ class HelperSearch | @@ -166,10 +166,12 @@ class HelperSearch | ||
166 | //再到着 | 166 | //再到着 |
167 | //年终大促 | 167 | //年终大促 |
168 | // 年中大促 | 168 | // 年中大促 |
169 | - | ||
170 | - $gender = isset(self::$options['gender']) ? explode(',', self::$options['gender'])[0] : 0; | 169 | + $gender = 0; |
170 | + if (isset(self::$options['gender'])) { | ||
171 | + $genderArr = explode(',', self::$options['gender']); | ||
172 | + $gender = $genderArr[0]; | ||
173 | + } | ||
171 | foreach($val['goods_list'] as $k => $v){ | 174 | foreach($val['goods_list'] as $k => $v){ |
172 | - | ||
173 | $goods_list[$k]['url'] = Helpers::getUrlBySkc($val['product_id'], $v['goods_id'], $val['cn_alphabet']); | 175 | $goods_list[$k]['url'] = Helpers::getUrlBySkc($val['product_id'], $v['goods_id'], $val['cn_alphabet']); |
174 | //女封 | 176 | //女封 |
175 | if (isset($v['cover_1']) && $gender == 1) { | 177 | if (isset($v['cover_1']) && $gender == 1) { |
-
Please register or login to post a comment