Authored by yyq

三级菜单分类添加热门

... ... @@ -84,7 +84,7 @@ const getBrandItems = (data) => {
_.forEach(data, item => {
brandItems.push({
link: item.sort_url,
hot: item.is_hot === 'Y' ? true : false,
hot: item.is_hot === 'Y',
name: item.sort_name
});
});
... ... @@ -103,16 +103,15 @@ const getThirdNav = (data) => {
_.forEach(data, item => {
let obj = {
link: item.sort_url,
name: item.sort_name
hot: item.is_hot === 'Y',
name: item.sort_name,
category: true
};
thirdNav.push(obj);
if (item.sub) {
thirdNav = _.concat(thirdNav, getBrandItems(item.sub));
obj.category = true;
// obj.brandItems = getBrandItems(item.sub);
}
});
... ...
... ... @@ -35,6 +35,9 @@
{{#if category}}
<dt>
<a href="{{link}}">{{name}}</a>
{{#if hot}}
<span class="hot"></span>
{{/if}}
</dt>
{{^}}
<dd>
... ...