Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Rock Zhang
9 years ago
Commit
60cbed7aedcd02819fc9f4d3fd79b9bc9cd5e31c
1 parent
84821671
添加对个人中心首页是否登陆状态的判定
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
60cbed7
...
...
@@ -27,7 +27,8 @@ class HomeController extends AbstractAction
// {
// // 检查用户是否登录, 未登录则跳转到登录页
// $uid = $this->getUid(true);
// if (!$uid) {
// $action = $this->getRequest()->getActionName();
// if (!$uid && $action !== 'index') {
// $this->go(Helpers::url('/signin.html'));
// }
//
...
...
@@ -43,18 +44,22 @@ class HomeController extends AbstractAction
$this
->
setTitle
(
'个人中心'
);
$this
->
setNavHeader
(
'个人中心'
);
// $uid = $this->getUid();
$uid
=
8826435
;
$data
=
\Index\UserModel
::
getUserProfileData
(
$uid
);
$data
+=
\Index\UserModel
::
getInfoNumData
(
$uid
);
// 优选新品数据
$channel
=
Helpers
::
getChannelByCookie
();
$data
[
'recommendForYou'
]
=
\Index\UserModel
::
getPreferenceData
(
$channel
);
// print_r($data);
$data
[
'myIndexPage'
]
=
true
;
$data
[
'pageFooter'
]
=
true
;
$data
=
array
(
'myIndexPage'
=>
true
,
'pageFooter'
=>
true
);
echo
$this
->
getRequest
()
->
getActionName
();
$uid
=
$this
->
getUid
();
if
(
$uid
)
{
$data
[
'isLogin'
]
=
true
;
$uid
=
8826435
;
$data
+=
\Index\UserModel
::
getUserProfileData
(
$uid
);
$data
+=
\Index\UserModel
::
getInfoNumData
(
$uid
);
// 优选新品数据
$channel
=
Helpers
::
getChannelByCookie
();
$data
[
'recommendForYou'
]
=
\Index\UserModel
::
getPreferenceData
(
$channel
);
}
$this
->
_view
->
display
(
'index'
,
$data
);
}
...
...
Please
register
or
login
to post a comment