...
|
...
|
@@ -3,7 +3,7 @@ use Action\WebAction; |
|
|
use LibModels\Web\Product\BrandData;
|
|
|
use LibModels\Web\Product\FavoriteData;
|
|
|
|
|
|
use \LibModels\Web\Product\HotrankData;
|
|
|
use LibModels\Web\Product\HotrankData;
|
|
|
use product\HotrankModel;
|
|
|
use LibModels\Web\Home\IndexData;
|
|
|
|
...
|
...
|
@@ -144,28 +144,15 @@ class IndexController extends WebAction |
|
|
);
|
|
|
|
|
|
//焦点图 热门品牌
|
|
|
$focus = \Index\HomeModel::getChannelResource($channel['channel'], $channel['code']);
|
|
|
$focus = \product\HotrankModel::getFocusResource($channel['channel'], $channel['code']);
|
|
|
$data['hotrank']['slide'] = $focus[0]['slide'];
|
|
|
$data['hotrank']['hotBrands'] = $focus[1]['hotBrands'];
|
|
|
|
|
|
//人气单品 一周热卖
|
|
|
$page = $this->get('page',1);
|
|
|
$sort_id = $this->get('sid',0);
|
|
|
$viewNum = 60;
|
|
|
$param = array('order'=>'s_n_desc','viewNum'=>$viewNum,'page'=>$page,'stocknumber'=>1,'status'=>1,'gender'=>$channel['gender'],'attribute_not'=>2);
|
|
|
if($sort_id != 0)
|
|
|
{
|
|
|
$param['sort'] = $sort_id;
|
|
|
}
|
|
|
if($channel['road'] == 3)
|
|
|
{
|
|
|
$param['msort'] = 365;
|
|
|
}elseif($channel['road'] == 4){
|
|
|
$param['msort'] = 10;
|
|
|
}else{
|
|
|
$param['not_maxSortId'] = '10,365';
|
|
|
}
|
|
|
$publiclist = \product\HotrankModel::getSearchData($param,$page,0);
|
|
|
$config = array('sort' =>$sort_id,'gender' => $channel['gender'],'road' => $channel['road']);
|
|
|
$publiclist = \product\HotrankModel::getSearchData($config,$page,0);
|
|
|
$data['hotrank']['popular'] = $publiclist['popular'];
|
|
|
$data['hotrank']['hotWeek'] = $publiclist['hotWeek'];
|
|
|
|
...
|
...
|
@@ -180,7 +167,6 @@ class IndexController extends WebAction |
|
|
*/
|
|
|
public function getdataAction()
|
|
|
{
|
|
|
|
|
|
$page = $this->get('page',1);
|
|
|
//加载到100个以后停止
|
|
|
if($page > 2)
|
...
|
...
|
@@ -200,24 +186,11 @@ class IndexController extends WebAction |
|
|
$sort = $info['data']['category_id'];
|
|
|
}
|
|
|
}
|
|
|
$viewNum = 60;
|
|
|
//获取频道资源
|
|
|
$channel = \product\HotrankModel::getChannelResource();
|
|
|
$param = array('order'=>'s_n_desc','viewNum'=>$viewNum,'page'=>$page,'sort'=>$sort,'stocknumber'=>1,'status'=>1,
|
|
|
'gender'=>$channel['gender'],'attribute_not'=>2,);
|
|
|
if(empty($param['sort']))
|
|
|
{
|
|
|
if($channel['road'] == 3)
|
|
|
{
|
|
|
$param['msort'] = 365;
|
|
|
}elseif($channel['road'] == 4){
|
|
|
$param['msort'] = 10;
|
|
|
}else{
|
|
|
$param['not_maxSortId'] = '10,365';
|
|
|
}
|
|
|
}
|
|
|
//一周热卖
|
|
|
$list = \product\HotrankModel::getSearchData($param, $page, 1);
|
|
|
$config = array('sort' =>$sort,'gender' => $channel['gender'],'road' => $channel['road']);
|
|
|
$list = \product\HotrankModel::getSearchData($config, $page, 1);
|
|
|
$lister = $list['hotWeek']['list'];
|
|
|
$lister = array_values($lister);
|
|
|
if($sid == 1 && $page == 1)
|
...
|
...
|
|