Showing
2 changed files
with
11 additions
and
7 deletions
@@ -19,14 +19,18 @@ const _ = require('lodash'); | @@ -19,14 +19,18 @@ const _ = require('lodash'); | ||
19 | * @param domain | 19 | * @param domain |
20 | * @returns {*[]} | 20 | * @returns {*[]} |
21 | */ | 21 | */ |
22 | -function shopMenu(domain) { | 22 | +function shopMenu(domain, customMenu) { |
23 | let menus = [ | 23 | let menus = [ |
24 | - {id: 'index', name: '店铺首页', href: `/product/shop/${domain}`}, | ||
25 | - {id: 'all', name: '全部商品', href: `/product/shop/${domain}/list`, icon: ''}, | ||
26 | - {id: 'hot', name: '人气单品', href: `/product/shop/${domain}/list?order=s_n_desc`}, | ||
27 | - {id: 'new', name: '新品上架', href: `/product/shop/${domain}/list?order=s_t_desc`} | 24 | + {id: 'index', name: '店铺首页', url: `/product/shop/${domain}`}, |
25 | + {id: 'all', name: '全部商品', url: `/product/shop/${domain}/list`, icon: ''}, | ||
26 | + {id: 'hot', name: '人气单品', url: `/product/shop/${domain}/list?order=s_n_desc`}, | ||
27 | + {id: 'new', name: '新品上架', url: `/product/shop/${domain}/list?order=s_t_desc`} | ||
28 | ]; | 28 | ]; |
29 | 29 | ||
30 | + if (customMenu && customMenu.length > 0) { | ||
31 | + menus = _.concat(menus, customMenu); | ||
32 | + } | ||
33 | + | ||
30 | return menus; | 34 | return menus; |
31 | } | 35 | } |
32 | 36 | ||
@@ -137,7 +141,7 @@ const ShopService = { | @@ -137,7 +141,7 @@ const ShopService = { | ||
137 | info.banner = resources.shopTopBanner.shopSrc; // eslint-disable-line | 141 | info.banner = resources.shopTopBanner.shopSrc; // eslint-disable-line |
138 | } | 142 | } |
139 | info.resources = resources; | 143 | info.resources = resources; |
140 | - info.menus = shopMenu(domain); | 144 | + info.menus = shopMenu(domain, resources.navigationBar); |
141 | } else { | 145 | } else { |
142 | let brandId = domainInfo.id; | 146 | let brandId = domainInfo.id; |
143 | let brandInfo = yield BrandService.getBrandInfo(brandId, uid); | 147 | let brandInfo = yield BrandService.getBrandInfo(brandId, uid); |
-
Please register or login to post a comment