|
|
<?php
|
|
|
use Action\WebAction;
|
|
|
use LibModels\Web\Product\BrandData;
|
|
|
use LibModels\Web\Product\FavoriteData;
|
|
|
|
|
|
use \LibModels\Web\Product\HotrankData;
|
|
|
use product\HotrankModel;
|
...
|
...
|
@@ -50,6 +51,7 @@ class IndexController extends WebAction |
|
|
|
|
|
//调用模型获得数据
|
|
|
$data = Product\BrandsModel::getBrandSearchData($condition, $options);
|
|
|
|
|
|
$data = array(
|
|
|
//初始化js
|
|
|
'searchListPage' => true,
|
...
|
...
|
@@ -106,6 +108,22 @@ class IndexController extends WebAction |
|
|
//渲染模板
|
|
|
$this->_view->display('list',$data);
|
|
|
}
|
|
|
|
|
|
//收藏品牌
|
|
|
public function favoriteBrandAction($uid = '', $brandId = '')
|
|
|
{
|
|
|
if (!$this->isAjax()) {
|
|
|
return;
|
|
|
}
|
|
|
if ($uid && $brandId) {
|
|
|
//调用接口收藏或取消收藏
|
|
|
$result = FavoriteData::changeFavoriteBrand($uid, $brandId);
|
|
|
if (isset($result['code']) && $result['code'] == 200) {
|
|
|
$this ->echoJson($result['message']);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 热销排行
|
|
|
*/
|
...
|
...
|
|