Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
姜枫
9 years ago
Commit
ba7cb36462d4b71abc42cd0bd5d68466ef7e396b
1 parent
9e98c4de
fix bug 574
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
apps/product/models/shop-service.js
apps/product/views/partial/list/shop-menu.hbs
apps/product/models/shop-service.js
View file @
ba7cb36
...
...
@@ -19,14 +19,18 @@ const _ = require('lodash');
* @param domain
* @returns {*[]}
*/
function
shopMenu
(
domain
)
{
function
shopMenu
(
domain
,
customMenu
)
{
let
menus
=
[
{
id
:
'index'
,
name
:
'店铺首页'
,
href
:
`
/
product
/
shop
/
$
{
domain
}
`
},
{
id
:
'all'
,
name
:
'全部商品'
,
href
:
`
/
product
/
shop
/
$
{
domain
}
/list`, icon: ''}
,
{
id
:
'hot'
,
name
:
'人气单品'
,
href
:
`
/
product
/
shop
/
$
{
domain
}
/list
?
order=s_n_desc`}
,
{
id
:
'new'
,
name
:
'新品上架'
,
href
:
`
/
product
/
shop
/
$
{
domain
}
/list
?
order=s_t_desc`
}
{
id
:
'index'
,
name
:
'店铺首页'
,
url
:
`
/
product
/
shop
/
$
{
domain
}
`
},
{
id
:
'all'
,
name
:
'全部商品'
,
url
:
`
/
product
/
shop
/
$
{
domain
}
/list`, icon: ''}
,
{
id
:
'hot'
,
name
:
'人气单品'
,
url
:
`
/
product
/
shop
/
$
{
domain
}
/list
?
order=s_n_desc`}
,
{
id
:
'new'
,
name
:
'新品上架'
,
url
:
`
/
product
/
shop
/
$
{
domain
}
/list
?
order=s_t_desc`
}
];
if
(
customMenu
&&
customMenu
.
length
>
0
)
{
menus
=
_
.
concat
(
menus
,
customMenu
);
}
return
menus
;
}
...
...
@@ -137,7 +141,7 @@ const ShopService = {
info
.
banner
=
resources
.
shopTopBanner
.
shopSrc
;
// eslint-disable-line
}
info
.
resources
=
resources
;
info
.
menus
=
shopMenu
(
domain
);
info
.
menus
=
shopMenu
(
domain
,
resources
.
navigationBar
);
}
else
{
let
brandId
=
domainInfo
.
id
;
let
brandInfo
=
yield
BrandService
.
getBrandInfo
(
brandId
,
uid
);
...
...
apps/product/views/partial/list/shop-menu.hbs
View file @
ba7cb36
...
...
@@ -3,7 +3,7 @@
<ul
class=
"shop-menu"
>
{{#
each
menus
}}
<li>
<a
href=
"
{{
href
}}
"
>
<a
href=
"
{{
url
}}
"
>
{{
name
}}
{{#
icon
}}
<i
class=
"iconfont"
>

</i>
...
...
Please
register
or
login
to post a comment