...
|
...
|
@@ -13,15 +13,12 @@ class SaleController extends WebAction |
|
|
public function indexAction()
|
|
|
{
|
|
|
//获取专区ID
|
|
|
$specialsaleId = $this->Param('specialsaleId');
|
|
|
$specialsaleId = 1; //测试数据
|
|
|
$specialsaleId = $this->param('specialsaleId');
|
|
|
$specialInfo = SaleData::getSpecial($specialsaleId);
|
|
|
$special = $specialInfo['data'];
|
|
|
// if (empty($specialsale_id)) {
|
|
|
// $specialsale_id = str_replace('specialsale', '', explode('.', $_SERVER['HTTP_HOST'])[0]);
|
|
|
// }
|
|
|
|
|
|
//获取促销ID
|
|
|
$promotion = $this->Param('promotion');
|
|
|
$promotion = $this->param('promotion');
|
|
|
|
|
|
//专区ID和促销ID都为空时,跳转到主页
|
|
|
if (empty($specialsaleId) && empty($promotion)) {
|
...
|
...
|
@@ -63,7 +60,9 @@ class SaleController extends WebAction |
|
|
|
|
|
//传促销id
|
|
|
if(!empty($special['ispromotion'])){
|
|
|
//$condition['promotion'] = $special['ispromotion'];
|
|
|
$condition['promotion'] = $special['ispromotion'];
|
|
|
}else{
|
|
|
$condition['promotion'] = $promotion;
|
|
|
}
|
|
|
|
|
|
//获取性别数据
|
...
|
...
|
@@ -108,7 +107,6 @@ class SaleController extends WebAction |
|
|
$params = array_filter($params);
|
|
|
|
|
|
$data = Product\SaleModel::getSaleSearchData($params, $options, $specialInfo);
|
|
|
|
|
|
$cate = array('boys', 'girls', 'kids', 'lifestyle');
|
|
|
$this->setWebNavHeader($cate[$gender - 1]);
|
|
|
//渲染模板
|
...
|
...
|
|