Authored by Rock Zhang

收藏页添加一些字段标识页面

... ... @@ -15,7 +15,7 @@
{{product_favorite_total}}
<p>收藏的商品</p>
</a>
<a class="link-item" href="/home/favoritebrand">
<a class="link-item" href="/home/favorite?tab=brand">
{{brand_favorite_total}}
<p>收藏的品牌</p>
</a>
... ...
... ... @@ -68,20 +68,26 @@ class HomeController extends AbstractAction
$this->setTitle('我的收藏');
$this->setNavHeader('我的收藏', true, SITE_MAIN);
$tab = $this->get('tab', '');
$uid = $this->getUid();
$uid = 8826435;
$gender = Helpers::getGenderByCookie();
$favProducts = \Index\UserModel::getFavProductData($uid);
$favBrands = \Index\UserModel::getFavBrandData($uid, $gender);
$this->_view->display('favorite', array(
$data = array(
'favPage' => true, //加载js
'pageFooter' => true,
'favorite' => true,
'hasFavProduct' => $favProducts,
'hasFavBrand' => $favBrands
));
);
// 判断时候为品牌页
if ($tab === 'brand') {
$data['brandTab'] = true;
}
$this->_view->display('favorite', $data);
}
/**
... ... @@ -106,19 +112,6 @@ class HomeController extends AbstractAction
}
/**
* 用户收藏的品牌
*/
public function favoritebrandAction()
{
$uid = $this->getUid();
$gender = Helpers::getGenderByCookie();
$favBrands = \Index\UserModel::getFavBrandData($uid, $gender);
print_r($favBrands);
}
/**
* 个人信息
*/
public function personalDetailsAction()
... ...