...
|
...
|
@@ -3,6 +3,7 @@ |
|
|
use Action\AbstractAction;
|
|
|
use LibModels\Wap\Product\NewsaleData;
|
|
|
use Product\NewsaleModel;
|
|
|
use Plugin\Helpers;
|
|
|
|
|
|
/**
|
|
|
* 新品到着
|
...
|
...
|
@@ -20,8 +21,7 @@ class NewsaleController extends AbstractAction |
|
|
$this->setTitle('新品到着');
|
|
|
$this->setNavHeader('新品到着');
|
|
|
|
|
|
$channel = $this->getCookie('_Channel', 'boys');
|
|
|
$this->channelTrans($channel);
|
|
|
$channel = Helpers::getChannelByCookie();
|
|
|
|
|
|
$data = array();
|
|
|
$data['newArrivalPage'] = true;
|
...
|
...
|
@@ -34,7 +34,7 @@ class NewsaleController extends AbstractAction |
|
|
$data += array(
|
|
|
'brand' => 0,
|
|
|
'msort' => 0,
|
|
|
'gender' => $this->getCookie('_Channel', 'boys'),
|
|
|
'gender' => Helpers::getGenderByCookie(),
|
|
|
'price' => 0,
|
|
|
'size' => 0,
|
|
|
'dayLimit' => 1,
|
...
|
...
|
@@ -54,8 +54,7 @@ class NewsaleController extends AbstractAction |
|
|
$this->setTitle('折扣专区');
|
|
|
$this->setNavHeader('Sale');
|
|
|
|
|
|
$channel = $this->getCookie('_Channel', 'boys');
|
|
|
$this->channelTrans($channel);
|
|
|
$channel = Helpers::getChannelByCookie();
|
|
|
|
|
|
$data = array();
|
|
|
$data['discountPage'] = true;
|
...
|
...
|
@@ -68,7 +67,7 @@ class NewsaleController extends AbstractAction |
|
|
$data += array(
|
|
|
'brand' => 0,
|
|
|
'msort' => 0,
|
|
|
'gender' => $this->getCookie('_Channel', 'boys'),
|
|
|
'gender' => Helpers::getGenderByCookie(),
|
|
|
'price' => 0,
|
|
|
'size' => 0,
|
|
|
'discount' => '0.1,0.9'
|
...
|
...
|
@@ -92,7 +91,6 @@ class NewsaleController extends AbstractAction |
|
|
$size = $this->get('size', null);
|
|
|
$price = $this->get('price', null);
|
|
|
$p_d = $this->get('discount', null);
|
|
|
$channel = $this->getCookie('_Channel', 'boys');
|
|
|
$dayLimit = $this->get('dayLimit', null);
|
|
|
$limit = $this->get('limit', 60);
|
|
|
$page = $this->get('page', 1);
|
...
|
...
|
@@ -128,7 +126,7 @@ class NewsaleController extends AbstractAction |
|
|
}
|
|
|
|
|
|
// 转换频道
|
|
|
$this->channelTrans($channel);
|
|
|
$channel = Helpers::getChannelByCookie();
|
|
|
|
|
|
$data = NewsaleData::selectNewSaleProducts(
|
|
|
$gender, $brand, $sort, $color,
|
...
|
...
|
@@ -149,28 +147,4 @@ class NewsaleController extends AbstractAction |
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 转换频道
|
|
|
* @param string &$channel 待转换的频道
|
|
|
* @return integer 转换之后的频道
|
|
|
*/
|
|
|
private function channelTrans(&$channel)
|
|
|
{
|
|
|
switch ($channel) {
|
|
|
case 'girls':
|
|
|
$channel = 2;
|
|
|
break;
|
|
|
case 'kids':
|
|
|
$channel = 3;
|
|
|
break;
|
|
|
case 'lifestyle':
|
|
|
$channel = 4;
|
|
|
break;
|
|
|
case 'boys':
|
|
|
default:
|
|
|
$channel = 1;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|