Authored by yangyang

修改品牌页和sale页商品数量显示问题

... ... @@ -61,15 +61,15 @@ class IndexController extends WebAction
//每页显示商品数
if(!isset($condition['viewNum']) || empty($condition['viewNum'])){
$condition['viewNum'] = 59;
$condition['viewNum'] =60;
}
$view_num_arr = array(60, 100, 200);
if (!in_array($condition['viewNum'], $view_num_arr)) {
$condition['viewNum'] = 59;
$condition['viewNum'] = 60;
}
//每行显示的商品数量
if(!isset($condition['rowNum']) || empty($condition['rowNum'])){
$condition['rowNum'] = 5;
$condition['rowNum'] =5;
}
if ($condition['rowNum'] == 6) {
$imgSize = array(195, 260);
... ... @@ -88,11 +88,13 @@ class IndexController extends WebAction
'gender' => $gender,
'needPd' => 'Y',
'rowNum' => $condition['rowNum'],
'viewNum' => $condition['viewNum'] - 1,
'viewNum' => $condition['viewNum'],
);
$params = $condition + $_GET;
$params = array_filter($params);
//每页记录数减1,下一页占位
$params['viewNum'] = $params['viewNum'] - 1;
$data = Product\BrandsModel::getBrandSearchData($params,$options,$domain,$uid,$brandId,$node);
$cate = array('boys','girls','kids','lifestyle');
$this->setWebNavHeader($cate[$gender-1]);
... ...
... ... @@ -73,11 +73,11 @@ class SaleController extends WebAction
//每页显示商品数
if (!isset($condition['viewNum']) || empty($condition['viewNum'])) {
$condition['viewNum'] = 59;
$condition['viewNum'] = 60;
}
$view_num_arr = array(60, 100, 200);
if (!in_array($condition['viewNum'], $view_num_arr)) {
$condition['viewNum'] = 59;
$condition['viewNum'] = 60;
}
//每行显示的商品数量
if (!isset($condition['rowNum']) || empty($condition['rowNum'])) {
... ... @@ -100,13 +100,15 @@ class SaleController extends WebAction
'gender' => $gender,
'needPd' => 'Y',
'rowNum' => $condition['rowNum'],
'viewNum' => $condition['viewNum'] - 1,
'viewNum' => $condition['viewNum'],
'specialsale_id' => 'Y'
);
$params = $condition + $_GET;
$params['attribute_not'] = 2;
$params = array_filter($params);
//每页记录数减1,下一页占位
$params['viewNum'] = $params['viewNum'] - 1;
$data = Product\SaleModel::getSaleSearchData($params, $options, $specialInfo);
$cate = array('boys', 'girls', 'kids', 'lifestyle');
... ...
<?php
use Action\WebAction;
use LibModels\Web\Product\SaleData;
/**
* new页
*
*/
class NewController extends WebAction
{
public function indexAction()
{
echo 1;
//渲染模板
$this->_view->display('new-sale');
}
}
... ...