...
|
...
|
@@ -20,6 +20,8 @@ const needParams = ['query', 'msort', 'misort', 'gender', 'shelveTime']; |
|
|
|
|
|
// 品牌页folder名称
|
|
|
const brandFolderSeries = '经典系列';
|
|
|
const folderTitle = '经典款型';
|
|
|
const seriesTitle = '经典系列';
|
|
|
|
|
|
// 经典店铺list url
|
|
|
const shopListUrl = '/product/shoplist';
|
...
|
...
|
@@ -507,23 +509,37 @@ const getAdnav = (params) => { |
|
|
let resData = {};
|
|
|
|
|
|
return Promise.all([searchApi.getBrandShopFolder(params), searchApi.getBrandShopSeries(params)]).then(result => {
|
|
|
let list = [];
|
|
|
let flist = [];
|
|
|
let slist = [];
|
|
|
|
|
|
if (result[0].code === 200 && result[0].data) {
|
|
|
list = _.concat(list, searchHandler.handleFolderData(result[0].data, params));
|
|
|
flist = searchHandler.handleFolderData(result[0].data, params);
|
|
|
}
|
|
|
|
|
|
if (result[1].code === 200 && result[1].data) {
|
|
|
list = _.concat(list, searchHandler.handleSeriesData(result[1].data, params));
|
|
|
slist = searchHandler.handleSeriesData(result[1].data, params);
|
|
|
}
|
|
|
|
|
|
if (list.length) {
|
|
|
Object.assign(resData, {
|
|
|
picTitle: brandFolderSeries,
|
|
|
list: list
|
|
|
});
|
|
|
}
|
|
|
if (params.shopId) {
|
|
|
resData.floder = flist.length ? {
|
|
|
picTitle: folderTitle,
|
|
|
list: flist
|
|
|
} : {};
|
|
|
|
|
|
resData.series = slist.length ? {
|
|
|
picTitle: seriesTitle,
|
|
|
list: slist
|
|
|
} : {};
|
|
|
} else {
|
|
|
let list = _.concat(flist, slist);
|
|
|
|
|
|
if (list.length) {
|
|
|
Object.assign(resData, {
|
|
|
picTitle: brandFolderSeries,
|
|
|
list: list
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return resData;
|
|
|
});
|
...
|
...
|
|