Authored by yangyang

修改sale页没有分类的bug

... ... @@ -273,9 +273,8 @@ class HelperSearch
public static function groupSort($sort)
{
$options = self::$options;
if (isset($options['controller']) && $options['controller'] != 'Search') {
if (isset($options['controller']) && $options['controller'] == 'Search') {
return array();
}
//设置导航
... ... @@ -327,7 +326,7 @@ class HelperSearch
{
$result = array();
$options = self::$options;
if (!isset($options['controller']) || $options['controller'] != 'Search') {
if (!isset($options['controller']) || $options['controller'] == 'Search') {
return $result;
}
$params = self::$params;
... ...
... ... @@ -8,8 +8,26 @@ class ListController extends WebAction
}
/**
* list列表new(模板new-sale)
*/
public function newAction(){
$condition = array(
'order' => 's_t_desc'
);
$options = array(
'specialsale_id' => 'Y',
'needDay' => 'Y'
);
$newData = Product\NewModel::getNewSearchData($condition, $options);
$data = array(
'productListPage' => true,
'newSale' => $newData
);
$this->setWebNavHeader();
//渲染模板
$this->_view->display('new-sale', $data);
}
/**
... ...
<?php
use Action\WebAction;
/**
* new页
*
*/
class NewController extends WebAction
{
public function indexAction()
{
$condition = array(
'order' => 's_t_desc'
);
$options = array(
'specialsale_id' => 'Y',
'needDay' => 'Y'
);
$newData = Product\NewModel::getNewSearchData($condition, $options);
$data = array(
'productListPage' => true,
'newSale' => $newData
);
$this->setWebNavHeader();
//渲染模板
$this->_view->display('new-sale', $data);
}
}