Showing
2 changed files
with
8 additions
and
4 deletions
1 | <?php | 1 | <?php |
2 | use Action\WebAction; | 2 | use Action\WebAction; |
3 | -use LibModels\Web\Product\BrandData; | ||
4 | use LibModels\Web\Product\FavoriteData; | 3 | use LibModels\Web\Product\FavoriteData; |
5 | use Product\BrandsModel; | 4 | use Product\BrandsModel; |
6 | 5 | ||
@@ -47,6 +46,7 @@ class IndexController extends WebAction | @@ -47,6 +46,7 @@ class IndexController extends WebAction | ||
47 | $options['brandNameEn'] = isset($result['brandNameEn']) ? $result['brandNameEn'] : ''; | 46 | $options['brandNameEn'] = isset($result['brandNameEn']) ? $result['brandNameEn'] : ''; |
48 | $options['brandNameCn'] = isset($result['brandNameCn']) ? $result['brandNameCn'] : ''; | 47 | $options['brandNameCn'] = isset($result['brandNameCn']) ? $result['brandNameCn'] : ''; |
49 | $options['reviewNum'] = 6; | 48 | $options['reviewNum'] = 6; |
49 | + $options['controller'] = $this->_request->controller; | ||
50 | 50 | ||
51 | //调用模型获得数据 | 51 | //调用模型获得数据 |
52 | $data = BrandsModel::getBrandSearchData($condition, $options); | 52 | $data = BrandsModel::getBrandSearchData($condition, $options); |
@@ -91,6 +91,7 @@ class IndexController extends WebAction | @@ -91,6 +91,7 @@ class IndexController extends WebAction | ||
91 | $options['brandId'] = isset($result['brandId']) ? $result['brandId'] : ''; | 91 | $options['brandId'] = isset($result['brandId']) ? $result['brandId'] : ''; |
92 | $options['brandBanner'] = isset($result['brandBanner']) ? $result['brandBanner'] : ''; | 92 | $options['brandBanner'] = isset($result['brandBanner']) ? $result['brandBanner'] : ''; |
93 | $options['brandAbout'] = isset($result['brandAbout']) ? $result['brandAbout'] : ''; | 93 | $options['brandAbout'] = isset($result['brandAbout']) ? $result['brandAbout'] : ''; |
94 | + $options['controller'] = $this->_request->controller; | ||
94 | //调用模型获得数据 | 95 | //调用模型获得数据 |
95 | $data = Product\BrandsModel::getBrandIntro($condition, $options); | 96 | $data = Product\BrandsModel::getBrandIntro($condition, $options); |
96 | 97 |
@@ -12,7 +12,8 @@ class ListController extends WebAction | @@ -12,7 +12,8 @@ class ListController extends WebAction | ||
12 | $condition = array(); | 12 | $condition = array(); |
13 | $options = array( | 13 | $options = array( |
14 | 'positionId' => $positionId, | 14 | 'positionId' => $positionId, |
15 | - 'reviewNum' => 6 | 15 | + 'reviewNum' => 6, |
16 | + 'controller' => $this->_request->controller | ||
16 | ); | 17 | ); |
17 | 18 | ||
18 | $indexData = Product\IndexModel::getIndexData($condition, $options); | 19 | $indexData = Product\IndexModel::getIndexData($condition, $options); |
@@ -41,7 +42,8 @@ class ListController extends WebAction | @@ -41,7 +42,8 @@ class ListController extends WebAction | ||
41 | $newData = Product\NewModel::getNewSearchData($condition, $options); | 42 | $newData = Product\NewModel::getNewSearchData($condition, $options); |
42 | $data = array( | 43 | $data = array( |
43 | 'productListPage' => true, | 44 | 'productListPage' => true, |
44 | - 'newSale' => $newData | 45 | + 'newSale' => $newData, |
46 | + 'controller' => $this->_request->controller | ||
45 | ); | 47 | ); |
46 | $this->setWebNavHeader(); | 48 | $this->setWebNavHeader(); |
47 | //渲染模板 | 49 | //渲染模板 |
@@ -58,7 +60,8 @@ class ListController extends WebAction | @@ -58,7 +60,8 @@ class ListController extends WebAction | ||
58 | $data = array( | 60 | $data = array( |
59 | //初始化js | 61 | //初始化js |
60 | 'productListPage' => true, | 62 | 'productListPage' => true, |
61 | - 'list' => $list | 63 | + 'list' => $list, |
64 | + 'controller' => $this->_request->controller | ||
62 | ); | 65 | ); |
63 | $this->setWebNavHeader(); | 66 | $this->setWebNavHeader(); |
64 | $this->_view->display('list', $data); | 67 | $this->_view->display('list', $data); |
-
Please register or login to post a comment