Authored by yyq

shop more url

... ... @@ -538,7 +538,10 @@ exports.setShopSort = (data, params) => {
});
if (list.length) {
_.set(resData, 'goodsMenu.menuList', list);
resData.goodsMenu = {
menuList: list,
url: `/product/shoplist?navBar=1&shopId=${params.shopId}`
};
}
}
... ...
... ... @@ -70,9 +70,7 @@ const goodsTabBar = (data, shopId) => {
let dest = {
hot: [],
new: []
},
more = {name: 'MORE', href: shopListUrl + '?shopId=' + shopId};
};
_.forEach(data.hot, (value) => {
if (value.url) {
... ... @@ -92,8 +90,8 @@ const goodsTabBar = (data, shopId) => {
});
}
});
dest.hot.push(more);
dest.new.push(more);
dest.hot.push({name: 'MORE', url: `${shopListUrl}?navBar=2&order=s_n_desc&shopId=${shopId}`});
dest.new.push({name: 'MORE', url: `${shopListUrl}?navBar=3&order=s_t_desc&shopId=${shopId}`});
return dest;
};
... ... @@ -328,7 +326,7 @@ exports.getShopDecorator = (data, params, shopId) => {
Object.assign(dest.hotSingle, hotProducts(info));
break;
case 'goodsTabBar':
tabBar = goodsTabBar(info);
tabBar = goodsTabBar(info, shopId);
Object.assign(dest.newArrivel, {navs: tabBar.new});
Object.assign(dest.hotSingle, {navs: tabBar.hot});
break;
... ...