Authored by yangyang

控制器传controller值

<?php
use Action\WebAction;
use LibModels\Web\Product\BrandData;
use LibModels\Web\Product\FavoriteData;
use Product\BrandsModel;
... ... @@ -47,6 +46,7 @@ class IndexController extends WebAction
$options['brandNameEn'] = isset($result['brandNameEn']) ? $result['brandNameEn'] : '';
$options['brandNameCn'] = isset($result['brandNameCn']) ? $result['brandNameCn'] : '';
$options['reviewNum'] = 6;
$options['controller'] = $this->_request->controller;
//调用模型获得数据
$data = BrandsModel::getBrandSearchData($condition, $options);
... ... @@ -91,6 +91,7 @@ class IndexController extends WebAction
$options['brandId'] = isset($result['brandId']) ? $result['brandId'] : '';
$options['brandBanner'] = isset($result['brandBanner']) ? $result['brandBanner'] : '';
$options['brandAbout'] = isset($result['brandAbout']) ? $result['brandAbout'] : '';
$options['controller'] = $this->_request->controller;
//调用模型获得数据
$data = Product\BrandsModel::getBrandIntro($condition, $options);
... ...
... ... @@ -12,7 +12,8 @@ class ListController extends WebAction
$condition = array();
$options = array(
'positionId' => $positionId,
'reviewNum' => 6
'reviewNum' => 6,
'controller' => $this->_request->controller
);
$indexData = Product\IndexModel::getIndexData($condition, $options);
... ... @@ -41,7 +42,8 @@ class ListController extends WebAction
$newData = Product\NewModel::getNewSearchData($condition, $options);
$data = array(
'productListPage' => true,
'newSale' => $newData
'newSale' => $newData,
'controller' => $this->_request->controller
);
$this->setWebNavHeader();
//渲染模板
... ... @@ -58,7 +60,8 @@ class ListController extends WebAction
$data = array(
//初始化js
'productListPage' => true,
'list' => $list
'list' => $list,
'controller' => $this->_request->controller
);
$this->setWebNavHeader();
$this->_view->display('list', $data);
... ...