Showing
3 changed files
with
29 additions
and
1 deletions
@@ -188,7 +188,7 @@ class ListProcess | @@ -188,7 +188,7 @@ class ListProcess | ||
188 | 'dataType' => 'gender', | 188 | 'dataType' => 'gender', |
189 | 'subs' => array( | 189 | 'subs' => array( |
190 | array( | 190 | array( |
191 | - 'dataId' => empty($gender) ? '1,2,3' : $gender, // 产品非要这么做,我也没有办法 | 191 | + 'dataId' => '1,2,3', |
192 | 'name' => '所有性别' | 192 | 'name' => '所有性别' |
193 | ) | 193 | ) |
194 | ) | 194 | ) |
@@ -339,6 +339,20 @@ class SearchController extends AbstractAction | @@ -339,6 +339,20 @@ class SearchController extends AbstractAction | ||
339 | // /* 精确搜索品类 */ | 339 | // /* 精确搜索品类 */ |
340 | // $data = Product\ListModel::getClassData($condition); | 340 | // $data = Product\ListModel::getClassData($condition); |
341 | 341 | ||
342 | + // 产品吴婷要求这么做,目的是保持性别中的所有性别和当前频道性别一致 | ||
343 | + if ($condition['gender'] === '1,2,3') { | ||
344 | + switch ($condition['channel']) { | ||
345 | + case 1: | ||
346 | + $condition['gender'] = '1,3'; | ||
347 | + break; | ||
348 | + case 2: | ||
349 | + $condition['gender'] = '2,3'; | ||
350 | + break; | ||
351 | + default: | ||
352 | + break; | ||
353 | + } | ||
354 | + } | ||
355 | + | ||
342 | $data = Product\SearchModel::getSearchData($condition, $showTag, $tagNew, $tagSale); | 356 | $data = Product\SearchModel::getSearchData($condition, $showTag, $tagNew, $tagSale); |
343 | } while (false); | 357 | } while (false); |
344 | 358 |
@@ -151,6 +151,20 @@ class NewsaleController extends AbstractAction | @@ -151,6 +151,20 @@ class NewsaleController extends AbstractAction | ||
151 | // 转换频道 | 151 | // 转换频道 |
152 | $channel = $this->get('channel') ? $this->get('channel') : Helpers::getChannelByCookie(); | 152 | $channel = $this->get('channel') ? $this->get('channel') : Helpers::getChannelByCookie(); |
153 | 153 | ||
154 | + // 产品吴婷要求这么做,目的是保持性别中的所有性别和当前频道性别一致 | ||
155 | + if ($gender === '1,2,3') { | ||
156 | + switch ($channel) { | ||
157 | + case 1: | ||
158 | + $gender = '1,3'; | ||
159 | + break; | ||
160 | + case 2: | ||
161 | + $gender = '2,3'; | ||
162 | + break; | ||
163 | + default: | ||
164 | + break; | ||
165 | + } | ||
166 | + } | ||
167 | + | ||
154 | $data = NewsaleData::selectNewSaleProducts( | 168 | $data = NewsaleData::selectNewSaleProducts( |
155 | $gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit, $limit, $page, $order, null | 169 | $gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit, $limit, $page, $order, null |
156 | ); | 170 | ); |
-
Please register or login to post a comment