Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
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
39cde530866ff52d2b211361712c8a170bcde3ef
1 parent
d7504bfd
将为您优选提出到单独的异步请求
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
39cde53
...
...
@@ -51,18 +51,35 @@ class HomeController extends AbstractAction
);
$uid
=
$this
->
getUid
();
if
(
$uid
)
{
// 优选新品数据
$channel
=
Helpers
::
getChannelByCookie
();
$data
[
'isLogin'
]
=
true
;
$data
+=
UserModel
::
getUserProfileData
(
$uid
);
$data
+=
UserModel
::
getInfoNumData
(
$uid
);
$data
[
'recommendForYou'
]
=
UserModel
::
getPreferenceData
(
$channel
);
}
$this
->
_view
->
display
(
'index'
,
$data
);
}
/**
* 为您优选
*/
public
function
preferenceAction
()
{
$result
=
array
();
if
(
$this
->
isAjax
())
{
// 优选新品数据
$channel
=
Helpers
::
getChannelByCookie
();
$result
=
UserModel
::
getPreferenceData
(
$channel
);
}
if
(
empty
(
$result
))
{
echo
' '
;
}
else
{
$this
->
_view
->
display
(
'recommend-content'
,
$result
);
}
}
/**
* 用户收藏的商品
*/
...
...
Please
register
or
login
to post a comment