Showing
1 changed file
with
12 additions
and
3 deletions
@@ -77,7 +77,7 @@ class HelperSearch | @@ -77,7 +77,7 @@ class HelperSearch | ||
77 | unset(self::$params['page']); | 77 | unset(self::$params['page']); |
78 | self::$filter = isset($data['product']['filter']) ? $data['product']['filter'] : array(); | 78 | self::$filter = isset($data['product']['filter']) ? $data['product']['filter'] : array(); |
79 | //产品列表 | 79 | //产品列表 |
80 | - $result['goods'] = isset($data['product']['product_list']) ? self::getProductList($data['product']['product_list'], $options['imgSize']) : array(); | 80 | + $result['goods'] = isset($data['product']['product_list']) ? self::getProductList($data['product']['product_list'], $options) : array(); |
81 | //总页数 | 81 | //总页数 |
82 | $result['page_total'] = isset($data['product']['page_total']) ? $data['product']['page_total'] : ''; | 82 | $result['page_total'] = isset($data['product']['page_total']) ? $data['product']['page_total'] : ''; |
83 | self::$pageTotal = $result['page_total']; | 83 | self::$pageTotal = $result['page_total']; |
@@ -148,7 +148,7 @@ class HelperSearch | @@ -148,7 +148,7 @@ class HelperSearch | ||
148 | * @author sefon 2015-12-21 17:24:04 | 148 | * @author sefon 2015-12-21 17:24:04 |
149 | * @return array | 149 | * @return array |
150 | */ | 150 | */ |
151 | - public static function getProductList($product, $imgSize) | 151 | + public static function getProductList($product, $options) |
152 | { | 152 | { |
153 | $params = self::$params; | 153 | $params = self::$params; |
154 | $goods = array(); | 154 | $goods = array(); |
@@ -168,6 +168,15 @@ class HelperSearch | @@ -168,6 +168,15 @@ class HelperSearch | ||
168 | //再到着 | 168 | //再到着 |
169 | //年终大促 | 169 | //年终大促 |
170 | // 年中大促 | 170 | // 年中大促 |
171 | + if ($options['controller'] == 'List' && $options['action'] == 'new') { | ||
172 | + $isNew = false; | ||
173 | + $isSale = false; | ||
174 | + //TODO再到着不显示 | ||
175 | + } | ||
176 | + if ($options['controller'] == 'List' && $options['action'] == 'sale') { | ||
177 | + $isNew = false; | ||
178 | + $isSale = false; | ||
179 | + } | ||
171 | $gender = 0; | 180 | $gender = 0; |
172 | if (isset(self::$options['gender'])) { | 181 | if (isset(self::$options['gender'])) { |
173 | $genderArr = explode(',', self::$options['gender']); | 182 | $genderArr = explode(',', self::$options['gender']); |
@@ -190,7 +199,7 @@ class HelperSearch | @@ -190,7 +199,7 @@ class HelperSearch | ||
190 | } | 199 | } |
191 | } | 200 | } |
192 | if (!empty($val['default_images'])) { | 201 | if (!empty($val['default_images'])) { |
193 | - $val['default_images'] = Images::getImageUrl($val['default_images'],$imgSize[0],$imgSize[1]); | 202 | + $val['default_images'] = Images::getImageUrl($val['default_images'],$options['imgSize'][0],$options['imgSize'][1]); |
194 | } | 203 | } |
195 | //搜索关键字高亮 | 204 | //搜索关键字高亮 |
196 | if (isset(self::$params['query']) && !empty(self::$params['query']) && preg_match("/".self::$params['query']."/i", $val['product_name'], $match)) { | 205 | if (isset(self::$params['query']) && !empty(self::$params['query']) && preg_match("/".self::$params['query']."/i", $val['product_name'], $match)) { |
-
Please register or login to post a comment