...
|
...
|
@@ -27,9 +27,9 @@ class HomeController extends AbstractAction |
|
|
public function init()
|
|
|
{
|
|
|
// 检查用户是否登录, 未登录则跳转到登录页
|
|
|
$uid = 8826435; //$this->getUid(true);
|
|
|
$this->_uid = $this->getUid(false);
|
|
|
$action = $this->getRequest()->getActionName();
|
|
|
if (!$uid && $action !== 'index') {
|
|
|
if (!$this->_uid && $action !== 'index') {
|
|
|
$this->go(Helpers::url('/signin.html'));
|
|
|
}
|
|
|
|
...
|
...
|
@@ -49,11 +49,10 @@ class HomeController extends AbstractAction |
|
|
'myIndexPage' => true,
|
|
|
'pageFooter' => true
|
|
|
);
|
|
|
$uid = $this->getUid();
|
|
|
if ($uid) {
|
|
|
if ($this->_uid) {
|
|
|
$data['isLogin'] = true;
|
|
|
$data += UserModel::getUserProfileData($uid);
|
|
|
$data += UserModel::getInfoNumData($uid);
|
|
|
$data += UserModel::getUserProfileData($this->_uid);
|
|
|
$data += UserModel::getInfoNumData($this->_uid);
|
|
|
|
|
|
// 优选新品数据
|
|
|
$channel = Helpers::getChannelByCookie();
|
...
|
...
|
@@ -73,10 +72,9 @@ class HomeController extends AbstractAction |
|
|
$this->setNavHeader('我的收藏', true, SITE_MAIN);
|
|
|
|
|
|
$tab = $this->get('tab', '');
|
|
|
$uid = $this->getUid();
|
|
|
|
|
|
$favProducts = UserModel::getFavProductData($uid);
|
|
|
$favBrands = UserModel::getFavBrandData($uid, 10, 1, 10);
|
|
|
$favProducts = UserModel::getFavProductData($this->_uid);
|
|
|
$favBrands = UserModel::getFavBrandData($this->_uid, 10, 1, 10);
|
|
|
|
|
|
$data = array(
|
|
|
'favPage' => true, //加载js
|
...
|
...
|
@@ -158,8 +156,8 @@ class HomeController extends AbstractAction |
|
|
$uid = 8826435;
|
|
|
$coupons = array(
|
|
|
'couponsUrl' => array(
|
|
|
'used' => \Index\UserModel::getCouponData($uid, 0),
|
|
|
'unused' => \Index\UserModel::getCouponData($uid, 1)
|
|
|
'used' => UserModel::getCouponData($uid, 0),
|
|
|
'unused' => UserModel::getCouponData($uid, 1)
|
|
|
),
|
|
|
'couponsPage' => true
|
|
|
);
|
...
|
...
|
|