Authored by 姜枫

fix bug 574

... ... @@ -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);
... ...
... ... @@ -3,7 +3,7 @@
<ul class="shop-menu">
{{#each menus}}
<li>
<a href="{{href}}">
<a href="{{url}}">
{{name}}
{{#icon}}
<i class="iconfont">&#xe60a;</i>
... ...