...
|
...
|
@@ -13,16 +13,14 @@ class SaleController extends WebAction |
|
|
public function indexAction()
|
|
|
{
|
|
|
//获取专区ID
|
|
|
$specialsaleId = $this->Param('specialsaleId');
|
|
|
$specialsaleId = $this->param('specialsaleId');
|
|
|
$specialsaleId = 1; //测试数据
|
|
|
$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)) {
|
|
|
$this->go(SITE_MAIN);
|
...
|
...
|
@@ -49,7 +47,7 @@ class SaleController extends WebAction |
|
|
'viewNum' => FILTER_VALIDATE_INT,
|
|
|
'rowNum' => FILTER_VALIDATE_INT,
|
|
|
'page' => FILTER_VALIDATE_INT,), false);
|
|
|
|
|
|
|
|
|
//字符转码
|
|
|
if (!empty($condition)) {
|
|
|
foreach ($condition as &$value) {
|
...
|
...
|
@@ -64,6 +62,8 @@ class SaleController extends WebAction |
|
|
//传促销id
|
|
|
if(!empty($special['ispromotion'])){
|
|
|
//$condition['promotion'] = $special['ispromotion'];
|
|
|
}else{
|
|
|
$condition['promotion'] = $promotion;
|
|
|
}
|
|
|
|
|
|
//获取性别数据
|
...
|
...
|
@@ -73,7 +73,7 @@ class SaleController extends WebAction |
|
|
//每页显示商品数
|
|
|
if (!isset($condition['viewNum']) || empty($condition['viewNum'])) {
|
|
|
$condition['viewNum'] = 59;
|
|
|
}
|
|
|
}
|
|
|
$view_num_arr = array(60, 100, 200);
|
|
|
if (!in_array($condition['viewNum'], $view_num_arr)) {
|
|
|
$condition['viewNum'] = 59;
|
...
|
...
|
@@ -108,7 +108,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]);
|
|
|
//渲染模板
|
...
|
...
|
|