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
cailing
9 years ago
Commit
37fec8b5b779797057756083d27e01fd47991e10
1 parent
89f8e0f6
hotrank修改
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
library/WebPlugin/DataProcess/Process.php
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
library/WebPlugin/DataProcess/Process.php
View file @
37fec8b
...
...
@@ -834,7 +834,7 @@ class Process
{
$result
=
array
();
$temp
=
array
();
if
(
$data
[
$key
][
'template_name'
]
==
'custom_brands'
||
$data
[
$key
][
'template_name'
]
==
'kids_brands'
)
if
(
$data
[
$key
][
'template_name'
]
==
'custom_brands'
)
{
$result
=
array
(
'hotBrands'
=>
array
(
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
37fec8b
...
...
@@ -5,7 +5,6 @@ use LibModels\Web\Product\FavoriteData;
use
LibModels\Web\Product\HotrankData
;
use
product\HotrankModel
;
use
LibModels\Web\Home\IndexData
;
class
IndexController
extends
WebAction
{
...
...
@@ -131,13 +130,13 @@ class IndexController extends WebAction
}
}
/**
/**
* 热销排行
*/
public
function
hotrankAction
()
{
//获取频道
$channel
=
\product\
HotrankModel
::
getChannelResource
();
$channel
=
HotrankModel
::
getChannelResource
();
$this
->
setWebNavHeader
(
$channel
[
'channel'
]);
$data
=
array
(
'hotrankPage'
=>
true
,
'footerTop'
=>
true
,
...
...
@@ -145,7 +144,7 @@ class IndexController extends WebAction
);
//焦点图 热门品牌
$focus
=
\product\
HotrankModel
::
getFocusResource
(
$channel
[
'channel'
],
$channel
[
'code'
]);
$focus
=
HotrankModel
::
getFocusResource
(
$channel
[
'channel'
],
$channel
[
'code'
]);
$data
[
'hotrank'
][
'slide'
]
=
$focus
[
0
][
'slide'
];
$data
[
'hotrank'
][
'hotBrands'
]
=
$focus
[
1
][
'hotBrands'
];
...
...
@@ -153,12 +152,12 @@ class IndexController extends WebAction
$page
=
$this
->
get
(
'page'
,
1
);
$sort_id
=
$this
->
get
(
'sid'
,
0
);
$config
=
array
(
'sort'
=>
$sort_id
,
'gender'
=>
$channel
[
'gender'
],
'road'
=>
$channel
[
'road'
]);
$publiclist
=
\product\
HotrankModel
::
getSearchData
(
$config
,
$page
,
0
);
$publiclist
=
HotrankModel
::
getSearchData
(
$config
,
$page
,
0
);
$data
[
'hotrank'
][
'popular'
]
=
$publiclist
[
'popular'
];
$data
[
'hotrank'
][
'hotWeek'
]
=
$publiclist
[
'hotWeek'
];
//分类标签
$nav
=
\product\
HotrankModel
::
getHotranktag
(
'web'
,
$channel
[
'road'
],
true
);
$nav
=
HotrankModel
::
getHotranktag
(
'web'
,
$channel
[
'road'
],
true
);
$data
[
'hotrank'
][
'hotWeek'
][
'nav'
]
=
$nav
;
$this
->
_view
->
display
(
'hotrank'
,
$data
);
}
...
...
@@ -181,17 +180,17 @@ class IndexController extends WebAction
if
(
$sid
>
1
)
{
//通过ID获取标签信息
$info
=
\LibModels\Web\Product\
HotrankData
::
getTagById
(
$sid
,
false
);
$info
=
HotrankData
::
getTagById
(
$sid
,
false
);
if
(
!
empty
(
$info
[
'data'
]))
{
$sort
=
$info
[
'data'
][
'category_id'
];
}
}
//获取频道资源
$channel
=
\product\
HotrankModel
::
getChannelResource
();
$channel
=
HotrankModel
::
getChannelResource
();
//一周热卖
$config
=
array
(
'sort'
=>
$sort
,
'gender'
=>
$channel
[
'gender'
],
'road'
=>
$channel
[
'road'
]);
$list
=
\product\
HotrankModel
::
getSearchData
(
$config
,
$page
,
1
);
$list
=
HotrankModel
::
getSearchData
(
$config
,
$page
,
1
);
$lister
=
$list
[
'hotWeek'
][
'list'
];
$lister
=
array_values
(
$lister
);
if
(
$sid
==
1
&&
$page
==
1
)
...
...
Please
register
or
login
to post a comment