...
|
...
|
@@ -36,14 +36,23 @@ let _processCateData = (list, channel) => { |
|
|
if (firstItem.sub && firstItem.sub.length) {
|
|
|
_.map(firstItem.sub, function(secondItem) {
|
|
|
secondItem.url = helpers.urlFormat('/', {
|
|
|
sort: secondItem.categoryId,
|
|
|
sort: _.get(secondItem, 'relationParameter.sort'),
|
|
|
sort_name: secondItem.categoryName,
|
|
|
gender: genderMap[channel] || ''
|
|
|
}, 'list');
|
|
|
});
|
|
|
|
|
|
firstItem.sub.unshift({
|
|
|
categoryName: `全部${firstItem.categoryName}`,
|
|
|
url: helpers.urlFormat('/', {
|
|
|
sort: _.get(firstItem, 'relationParameter.sort'),
|
|
|
sort_name: firstItem.categoryName,
|
|
|
gender: genderMap[channel] || ''
|
|
|
}, 'list')
|
|
|
});
|
|
|
} else {
|
|
|
firstItem.url = helpers.urlFormat('/', {
|
|
|
sort: firstItem.categoryId,
|
|
|
sort: _.get(firstItem, 'relationParameter.sort'),
|
|
|
sort_name: firstItem.categoryName,
|
|
|
gender: genderMap[channel] || ''
|
|
|
}, 'list');
|
...
|
...
|
|