...
|
...
|
@@ -5,7 +5,6 @@ use LibModels\Web\Product\FavoriteData; |
|
|
|
|
|
use LibModels\Web\Product\HotrankData;
|
|
|
use product\HotrankModel;
|
|
|
use LibModels\Web\Home\IndexData;
|
|
|
|
|
|
class IndexController extends WebAction
|
|
|
{
|
...
|
...
|
@@ -131,13 +130,13 @@ class IndexController extends WebAction |
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
/**
|
|
|
* 热销排行
|
|
|
*/
|
|
|
public function hotrankAction()
|
|
|
{
|
|
|
//获取频道
|
|
|
$channel = \product\HotrankModel::getChannelResource();
|
|
|
$channel = HotrankModel::getChannelResource();
|
|
|
$this->setWebNavHeader($channel['channel']);
|
|
|
$data = array( 'hotrankPage' => true,
|
|
|
'footerTop'=> true,
|
...
|
...
|
@@ -145,7 +144,7 @@ class IndexController extends WebAction |
|
|
);
|
|
|
|
|
|
//焦点图 热门品牌
|
|
|
$focus = \product\HotrankModel::getFocusResource($channel['channel'], $channel['code']);
|
|
|
$focus = HotrankModel::getFocusResource($channel['channel'], $channel['code']);
|
|
|
$data['hotrank']['slide'] = $focus[0]['slide'];
|
|
|
$data['hotrank']['hotBrands'] = $focus[1]['hotBrands'];
|
|
|
|
...
|
...
|
@@ -153,12 +152,12 @@ class IndexController extends WebAction |
|
|
$page = $this->get('page',1);
|
|
|
$sort_id = $this->get('sid',0);
|
|
|
$config = array('sort' =>$sort_id,'gender' => $channel['gender'],'road' => $channel['road']);
|
|
|
$publiclist = \product\HotrankModel::getSearchData($config,$page,0);
|
|
|
$publiclist = HotrankModel::getSearchData($config,$page,0);
|
|
|
$data['hotrank']['popular'] = $publiclist['popular'];
|
|
|
$data['hotrank']['hotWeek'] = $publiclist['hotWeek'];
|
|
|
|
|
|
//分类标签
|
|
|
$nav = \product\HotrankModel::getHotranktag('web',$channel['road'],true);
|
|
|
$nav = HotrankModel::getHotranktag('web',$channel['road'],true);
|
|
|
$data['hotrank']['hotWeek']['nav'] = $nav;
|
|
|
$this->_view->display('hotrank', $data);
|
|
|
}
|
...
|
...
|
@@ -181,17 +180,17 @@ class IndexController extends WebAction |
|
|
if($sid > 1)
|
|
|
{
|
|
|
//通过ID获取标签信息
|
|
|
$info = \LibModels\Web\Product\HotrankData::getTagById($sid, false);
|
|
|
$info = HotrankData::getTagById($sid, false);
|
|
|
if(!empty($info['data']))
|
|
|
{
|
|
|
$sort = $info['data']['category_id'];
|
|
|
}
|
|
|
}
|
|
|
//获取频道资源
|
|
|
$channel = \product\HotrankModel::getChannelResource();
|
|
|
$channel = HotrankModel::getChannelResource();
|
|
|
//一周热卖
|
|
|
$config = array('sort' =>$sort,'gender' => $channel['gender'],'road' => $channel['road']);
|
|
|
$list = \product\HotrankModel::getSearchData($config, $page, 1);
|
|
|
$list = HotrankModel::getSearchData($config, $page, 1);
|
|
|
$lister = $list['hotWeek']['list'];
|
|
|
$lister = array_values($lister);
|
|
|
if($sid == 1 && $page == 1)
|
...
|
...
|
|