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
郭成尧
9 years ago
Commit
a064aad40ff04b5a749d1a5bc2e2d608fcd2a125
1 parent
d4091bc9
'用户中心为你优选'
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
yohobuy/www.yohobuy.com/application/models/Home/Index.php
yohobuy/www.yohobuy.com/application/modules/Home/controllers/Index.php
yohobuy/www.yohobuy.com/application/models/Home/Index.php
View file @
a064aad
...
...
@@ -3,6 +3,7 @@
namespace
Home
;
use
Home\UserModel
;
use
LibModels\Web\Home\UserData
;
use
LibModels\Web\Product\BrandData
;
use
WebPlugin\Helpers
;
use
WebPlugin\HelperHome
;
...
...
@@ -75,6 +76,25 @@ class IndexModel
}
/**
* @param $channel
* @param $uid
* @param $udid
* @param $recPos
* @param $limit
* @return array
*/
public
static
function
preferenceData
(
$channel
,
$uid
,
$udid
,
$recPos
,
$limit
)
{
$response
=
UserData
::
newPreference
(
$channel
,
$uid
,
$udid
,
$recPos
,
$limit
);
if
(
$response
[
'code'
]
===
200
)
{
return
HelperHome
::
formatNew
(
$response
[
'data'
][
'product_list'
]);
}
else
{
return
array
();
}
}
/**
* 底部banner
* @param string $code
* @return mixed
...
...
@@ -82,7 +102,7 @@ class IndexModel
public
static
function
getFooterBanner
(
$code
=
'20110609-152143'
)
{
$banner
=
BrandData
::
getByNodeContent
(
$code
);
$banner
=
BrandData
::
getByNodeContent
(
$code
);
if
(
isset
(
$banner
[
'code'
])
&&
!
empty
(
$banner
[
'data'
]))
{
return
$banner
[
'data'
];
}
...
...
yohobuy/www.yohobuy.com/application/modules/Home/controllers/Index.php
View file @
a064aad
...
...
@@ -34,6 +34,10 @@ class IndexController extends WebAction
$leftNav
=
UserModel
::
getCenterLeftNav
(
''
,
$uid
);
$data
=
IndexModel
::
homeData
();
$udid
=
$uid
.
$this
->
getUdid
();
// 为你优选 tar add 160701
$data
[
'recommend'
]
=
IndexModel
::
preferenceData
(
$channel
,
$uid
,
$udid
,
'100004'
,
30
);
//取消订单原因列表
$resons
=
OrderData
::
closeReasons
();
$cancelReason
=
isset
(
$resons
[
'data'
])
?
$resons
[
'data'
]
:
''
;
...
...
@@ -57,7 +61,7 @@ class IndexController extends WebAction
'newArrival'
=>
$data
[
'new'
]
)
),
'recommend'
=>
$data
[
'
new
'
],
//待处理
'recommend'
=>
$data
[
'
recommend
'
],
//待处理
'banner'
=>
IndexModel
::
getFooterBanner
(),
'helpUsUrl'
=>
''
);
...
...
Please
register
or
login
to post a comment