Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yyq
8 years ago
Commit
e955bb20ae8ce00a3d17245938bd9d475c711a44
1 parent
e341f25d
店铺带频道
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
apps/product/models/shop-handler.js
apps/product/models/shop-handler.js
View file @
e955bb2
...
...
@@ -144,23 +144,26 @@ const shopTopBannerBase = (data) => {
* @param data 装修数据
* @returns {{}}
*/
const
navigationBar
=
(
data
,
shopId
)
=>
{
const
navigationBar
=
(
data
,
shopId
,
params
)
=>
{
params
=
params
||
{};
const
gender
=
params
.
gender
?
`
&
gender
=
$
{
params
.
gender
}
`
:
''
;
let
shopNav
=
[
{
name
:
'店铺首页'
,
url
:
`
/
?
navBar
=
0
&
shopId
=
$
{
shopId
}
`
url
:
`
/
?
navBar
=
0
&
shopId
=
$
{
shopId
}
$
{
gender
}
`
},
{
name
:
'全部商品'
,
url
:
`
$
{
shopListUrl
}
/
?
navBar=1&shopId=${shopId}
`
url
:
`
$
{
shopListUrl
}
/
?
navBar=1&shopId=${shopId}
${gender}
`
},
{
name
:
'人气单品'
,
url
:
`
$
{
shopListUrl
}
/
?
navBar=2&order=s_n_desc&shopId=${shopId}
`
url
:
`
$
{
shopListUrl
}
/
?
navBar=2&order=s_n_desc&shopId=${shopId}
${gender}
`
},
{
name
:
'新品上架'
,
url
:
`
$
{
shopListUrl
}
/
?
navBar=3&order=s_t_desc&shopId=${shopId}
`
url
:
`
$
{
shopListUrl
}
/
?
navBar=3&order=s_t_desc&shopId=${shopId}
${gender}
`
}
];
...
...
@@ -402,7 +405,7 @@ exports.getShopDecorator = (data, params, shopId, base) => {
Object
.
assign
(
dest
,
shopTopBanner
(
info
));
break
;
case
'navigationBar'
:
Object
.
assign
(
dest
,
navigationBar
(
info
,
shopId
));
Object
.
assign
(
dest
,
navigationBar
(
info
,
shopId
,
params
));
break
;
case
'largeSlideImg'
:
Object
.
assign
(
dest
,
largeSlideImg
(
info
,
shopId
));
...
...
Please
register
or
login
to post a comment