...
|
...
|
@@ -748,14 +748,28 @@ const getShopCategory = (params) => { |
|
|
_.forEach(value.sub, (subValue, subKey) => {
|
|
|
value.sub[subKey].url = helpers.urlFormat('/product/search/list', {
|
|
|
shop_id: params.shopId,
|
|
|
sort: _.get(value, 'relation_parameter.sort', ''),
|
|
|
sort: _.get(subValue, 'relation_parameter.sort', ''),
|
|
|
title: subValue.category_name,
|
|
|
query: subValue.category_name
|
|
|
});
|
|
|
});
|
|
|
|
|
|
let subCategory = [
|
|
|
{
|
|
|
category_name: '全部' + value.category_name,
|
|
|
url: helpers.urlFormat('/product/search/list', {
|
|
|
shop_id: params.shopId,
|
|
|
sort: _.get(value, 'relation_parameter.sort', ''),
|
|
|
title: '全部' + value.category_name,
|
|
|
query: value.category_name
|
|
|
})
|
|
|
}
|
|
|
];
|
|
|
|
|
|
subCategory = subCategory.concat(value.sub);
|
|
|
|
|
|
finalResult.category.push({
|
|
|
subcategory: value.sub
|
|
|
subcategory: subCategory
|
|
|
});
|
|
|
});
|
|
|
|
...
|
...
|
|