Authored by yyq

商品列表全球购品牌页跳转

... ... @@ -315,7 +315,7 @@ const getShopList = params => {
};
if (value.is_global === 'Y') {
shopInfo.home = helpers.urlFormat(GLOBAL_BASE_URI, {brand: value.yoho_brand_id});
shopInfo.home = helpers.urlFormat(GLOBAL_BASE_URI, {brand: value.global_brand_id});
}
// 店铺/品牌的小分类
... ... @@ -329,7 +329,7 @@ const getShopList = params => {
} else {
sortHref = helpers.urlFormat(GLOBAL_BASE_URI, {
misort: subSort.sort_id,
brand: value.yoho_brand_id
brand: value.global_brand_id
});
}
shopInfo.sort.push({
... ...
... ... @@ -149,6 +149,7 @@ exports.processProductList = (list, options) => {
// }
_.forEach(list, (product) => {
// 全球购接口与普通接口返回商品差异属性预处理
if (options.isGlobal && product) {
Object.assign(product, {
goods_list: [{
... ... @@ -156,7 +157,8 @@ exports.processProductList = (list, options) => {
status: 1
}],
sales_price: product.orign_price,
market_price: null
market_price: null,
tbl_country_name: product.country_name
});
}
... ... @@ -217,14 +219,17 @@ exports.processProductList = (list, options) => {
}
// 4.6需求 商品列表显示店铺名
if (product.shop_id * 1) {
if (product.is_global === 'Y') {
product.brandUrl = helpers.urlFormat('/product/global/list', {brand: -product.brand_id});
} else if (product.shop_id * 1) {
product.brand_name = product.shop_name;
product.brandUrl = helpers.urlFormat('', {
shopId: product.shop_id
}, product.shop_domain || 'default-domain');
} else {
// tar add 1606071146 品牌链接处理
product.brandUrl = helpers.urlFormat('', '', product.brand_domain);
// 5.6商品列表未关联店铺不显示品牌
_.unset(product, 'brand_name');
// product.brandUrl = helpers.urlFormat('', '', product.brand_domain);
}
// TODO 删除from参数,暂时保留注释
... ... @@ -241,7 +246,7 @@ exports.processProductList = (list, options) => {
if (product.is_global === 'Y') {
tags.push({
is_global: true,
name: product.country_name
name: product.tbl_country_name
});
}
... ...