...
|
...
|
@@ -17,30 +17,30 @@ const serviceApi = global.yoho.ServiceAPI; |
|
|
const getMenuData = () => (
|
|
|
{
|
|
|
yohoGroup: [{
|
|
|
link: '/',
|
|
|
cn: '有货BLACK',
|
|
|
en: 'YOHO!BLK'
|
|
|
}, {
|
|
|
link: 'http://www.yohoboys.com',
|
|
|
cn: '男生潮流',
|
|
|
en: 'YOHO!BOYS'
|
|
|
}, {
|
|
|
link: 'http://www.yohogirls.com',
|
|
|
cn: '女生潮流',
|
|
|
en: 'YOHO!GIRLS'
|
|
|
}, {
|
|
|
link: 'http://app.yohoshow.com',
|
|
|
cn: '物趣分享',
|
|
|
en: 'YOHO!SHOW'
|
|
|
}, {
|
|
|
link: 'http://www.yohood.cn',
|
|
|
cn: '潮流嘉年华',
|
|
|
en: 'YO\'HOOD'
|
|
|
}, {
|
|
|
link: '//www.yohobuy.com',
|
|
|
cn: '有货',
|
|
|
en: 'YOHO!BUY'
|
|
|
}]
|
|
|
link: '/',
|
|
|
cn: '有货BLACK',
|
|
|
en: 'YOHO!BLK'
|
|
|
}, {
|
|
|
link: 'http://www.yohoboys.com',
|
|
|
cn: '男生潮流',
|
|
|
en: 'YOHO!BOYS'
|
|
|
}, {
|
|
|
link: 'http://www.yohogirls.com',
|
|
|
cn: '女生潮流',
|
|
|
en: 'YOHO!GIRLS'
|
|
|
}, {
|
|
|
link: 'http://app.yohoshow.com',
|
|
|
cn: '物趣分享',
|
|
|
en: 'YOHO!SHOW'
|
|
|
}, {
|
|
|
link: 'http://www.yohood.cn',
|
|
|
cn: '潮流嘉年华',
|
|
|
en: 'YO\'HOOD'
|
|
|
}, {
|
|
|
link: '//www.yohobuy.com',
|
|
|
cn: '有货',
|
|
|
en: 'YOHO!BUY'
|
|
|
}]
|
|
|
}
|
|
|
);
|
|
|
|
...
|
...
|
@@ -88,17 +88,11 @@ const getBrandItems = (data) => { |
|
|
let brandItems = [];
|
|
|
|
|
|
_.forEach(data, item => {
|
|
|
let obj = {
|
|
|
link: '',
|
|
|
hot: false,
|
|
|
brandName: ''
|
|
|
};
|
|
|
|
|
|
obj.link = item.sort_url;
|
|
|
obj.hot = item.is_hot === 'Y' ? true : false;
|
|
|
obj.brandName = item.sort_name;
|
|
|
|
|
|
brandItems.push(obj);
|
|
|
brandItems.push({
|
|
|
link: item.sort_url,
|
|
|
hot: item.is_hot === 'Y' ? true : false,
|
|
|
name: item.sort_name
|
|
|
});
|
|
|
});
|
|
|
|
|
|
|
...
|
...
|
@@ -115,23 +109,21 @@ const getThirdNav = (data) => { |
|
|
|
|
|
_.forEach(data, item => {
|
|
|
let obj = {
|
|
|
link: '',
|
|
|
title: '',
|
|
|
brandItems: false
|
|
|
link: item.sort_url,
|
|
|
name: item.sort_name
|
|
|
};
|
|
|
|
|
|
obj.link = item.sort_url;
|
|
|
obj.title = item.sort_name;
|
|
|
|
|
|
thirdNav.push(obj);
|
|
|
|
|
|
if (item.sub) {
|
|
|
obj.brandItems = getBrandItems(item.sub);
|
|
|
thirdNav = _.concat(thirdNav, getBrandItems(item.sub));
|
|
|
obj.category = true;
|
|
|
// obj.brandItems = getBrandItems(item.sub);
|
|
|
}
|
|
|
|
|
|
thirdNav.push(obj);
|
|
|
});
|
|
|
|
|
|
return thirdNav;
|
|
|
return _.chunk(thirdNav, 10);
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -195,7 +187,7 @@ const requestNavBar = (type) => { |
|
|
}).then(res => {
|
|
|
return setHeaderData(res.data, type);
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
|
|
|
|
|
|
|
...
|
...
|
@@ -208,7 +200,7 @@ exports.requestHeaderData = (type) => { |
|
|
let data = {};
|
|
|
|
|
|
let arr = [
|
|
|
getMenuData(),
|
|
|
getMenuData()
|
|
|
];
|
|
|
|
|
|
if (type) {
|
...
|
...
|
|