Authored by yangyang

修改sale页没有分类的bug

@@ -273,9 +273,8 @@ class HelperSearch @@ -273,9 +273,8 @@ class HelperSearch
273 273
274 public static function groupSort($sort) 274 public static function groupSort($sort)
275 { 275 {
276 -  
277 $options = self::$options; 276 $options = self::$options;
278 - if (isset($options['controller']) && $options['controller'] != 'Search') { 277 + if (isset($options['controller']) && $options['controller'] == 'Search') {
279 return array(); 278 return array();
280 } 279 }
281 //设置导航 280 //设置导航
@@ -327,7 +326,7 @@ class HelperSearch @@ -327,7 +326,7 @@ class HelperSearch
327 { 326 {
328 $result = array(); 327 $result = array();
329 $options = self::$options; 328 $options = self::$options;
330 - if (!isset($options['controller']) || $options['controller'] != 'Search') { 329 + if (!isset($options['controller']) || $options['controller'] == 'Search') {
331 return $result; 330 return $result;
332 } 331 }
333 $params = self::$params; 332 $params = self::$params;
@@ -8,8 +8,26 @@ class ListController extends WebAction @@ -8,8 +8,26 @@ class ListController extends WebAction
8 8
9 } 9 }
10 10
  11 + /**
  12 + * list列表new(模板new-sale)
  13 + */
11 public function newAction(){ 14 public function newAction(){
  15 + $condition = array(
  16 + 'order' => 's_t_desc'
  17 + );
  18 + $options = array(
  19 + 'specialsale_id' => 'Y',
  20 + 'needDay' => 'Y'
  21 + );
12 22
  23 + $newData = Product\NewModel::getNewSearchData($condition, $options);
  24 + $data = array(
  25 + 'productListPage' => true,
  26 + 'newSale' => $newData
  27 + );
  28 + $this->setWebNavHeader();
  29 + //渲染模板
  30 + $this->_view->display('new-sale', $data);
13 } 31 }
14 32
15 /** 33 /**
1 -<?php  
2 -  
3 -use Action\WebAction;  
4 -  
5 -/**  
6 - * new页  
7 - *  
8 - */  
9 -class NewController extends WebAction  
10 -{  
11 -  
12 - public function indexAction()  
13 - {  
14 - $condition = array(  
15 - 'order' => 's_t_desc'  
16 - );  
17 - $options = array(  
18 - 'specialsale_id' => 'Y',  
19 - 'needDay' => 'Y'  
20 - );  
21 -  
22 - $newData = Product\NewModel::getNewSearchData($condition, $options);  
23 - $data = array(  
24 - 'productListPage' => true,  
25 - 'newSale' => $newData  
26 - );  
27 - $this->setWebNavHeader();  
28 - //渲染模板  
29 - $this->_view->display('new-sale', $data);  
30 - }  
31 -  
32 -}