|
@@ -27,9 +27,9 @@ class HomeController extends AbstractAction |
|
@@ -27,9 +27,9 @@ class HomeController extends AbstractAction |
27
|
public function init()
|
27
|
public function init()
|
28
|
{
|
28
|
{
|
29
|
// 检查用户是否登录, 未登录则跳转到登录页
|
29
|
// 检查用户是否登录, 未登录则跳转到登录页
|
30
|
- $uid = 8826435; //$this->getUid(true);
|
30
|
+ $this->_uid = $this->getUid(false);
|
31
|
$action = $this->getRequest()->getActionName();
|
31
|
$action = $this->getRequest()->getActionName();
|
32
|
- if (!$uid && $action !== 'index') {
|
32
|
+ if (!$this->_uid && $action !== 'index') {
|
33
|
$this->go(Helpers::url('/signin.html'));
|
33
|
$this->go(Helpers::url('/signin.html'));
|
34
|
}
|
34
|
}
|
35
|
|
35
|
|
|
@@ -49,11 +49,10 @@ class HomeController extends AbstractAction |
|
@@ -49,11 +49,10 @@ class HomeController extends AbstractAction |
49
|
'myIndexPage' => true,
|
49
|
'myIndexPage' => true,
|
50
|
'pageFooter' => true
|
50
|
'pageFooter' => true
|
51
|
);
|
51
|
);
|
52
|
- $uid = $this->getUid();
|
|
|
53
|
- if ($uid) {
|
52
|
+ if ($this->_uid) {
|
54
|
$data['isLogin'] = true;
|
53
|
$data['isLogin'] = true;
|
55
|
- $data += UserModel::getUserProfileData($uid);
|
|
|
56
|
- $data += UserModel::getInfoNumData($uid);
|
54
|
+ $data += UserModel::getUserProfileData($this->_uid);
|
|
|
55
|
+ $data += UserModel::getInfoNumData($this->_uid);
|
57
|
|
56
|
|
58
|
// 优选新品数据
|
57
|
// 优选新品数据
|
59
|
$channel = Helpers::getChannelByCookie();
|
58
|
$channel = Helpers::getChannelByCookie();
|
|
@@ -73,10 +72,9 @@ class HomeController extends AbstractAction |
|
@@ -73,10 +72,9 @@ class HomeController extends AbstractAction |
73
|
$this->setNavHeader('我的收藏', true, SITE_MAIN);
|
72
|
$this->setNavHeader('我的收藏', true, SITE_MAIN);
|
74
|
|
73
|
|
75
|
$tab = $this->get('tab', '');
|
74
|
$tab = $this->get('tab', '');
|
76
|
- $uid = $this->getUid();
|
|
|
77
|
|
75
|
|
78
|
- $favProducts = UserModel::getFavProductData($uid);
|
|
|
79
|
- $favBrands = UserModel::getFavBrandData($uid, 10, 1, 10);
|
76
|
+ $favProducts = UserModel::getFavProductData($this->_uid);
|
|
|
77
|
+ $favBrands = UserModel::getFavBrandData($this->_uid, 10, 1, 10);
|
80
|
|
78
|
|
81
|
$data = array(
|
79
|
$data = array(
|
82
|
'favPage' => true, //加载js
|
80
|
'favPage' => true, //加载js
|
|
@@ -158,8 +156,8 @@ class HomeController extends AbstractAction |
|
@@ -158,8 +156,8 @@ class HomeController extends AbstractAction |
158
|
$uid = 8826435;
|
156
|
$uid = 8826435;
|
159
|
$coupons = array(
|
157
|
$coupons = array(
|
160
|
'couponsUrl' => array(
|
158
|
'couponsUrl' => array(
|
161
|
- 'used' => \Index\UserModel::getCouponData($uid, 0),
|
|
|
162
|
- 'unused' => \Index\UserModel::getCouponData($uid, 1)
|
159
|
+ 'used' => UserModel::getCouponData($uid, 0),
|
|
|
160
|
+ 'unused' => UserModel::getCouponData($uid, 1)
|
163
|
),
|
161
|
),
|
164
|
'couponsPage' => true
|
162
|
'couponsPage' => true
|
165
|
);
|
163
|
);
|