...
|
...
|
@@ -35,7 +35,7 @@ const shop = { |
|
|
if (shopId) {
|
|
|
let shopInfoApi = (yield req.ctx(shopModel).getShopInfo(shopId)) || {};
|
|
|
|
|
|
return res.redirect(301, `//m.yohobuy.com/shop/${_.get(shopInfoApi, 'data.shop_domain')}-${shopId}.html`); // eslint-disable-line
|
|
|
return res.redirect(301, `//m.yohobuy.com/shop/${_.get(shopInfoApi, 'data.shop_domain', 'id')}-${shopId}.html`); // eslint-disable-line
|
|
|
}
|
|
|
|
|
|
if (domain) {
|
...
|
...
|
@@ -44,14 +44,14 @@ const shop = { |
|
|
if (domainInfo.shopId && domainInfo.type === '2') {
|
|
|
return res.redirect(301, `//m.yohobuy.com/shop/${domain}-${_.get(domainInfo, 'shopId')}.html`);
|
|
|
} else {
|
|
|
return res.redirect(301, helpers.urlFormat('/index/brand', {
|
|
|
return res.redirect(301, helpers.urlFormat('/product/index/brand', {
|
|
|
brand_id: _.get(domainInfo, 'id')
|
|
|
}));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (brandId) {
|
|
|
return res.redirect(301, helpers.urlFormat('/index/brand', { brand_id: brandId }));
|
|
|
return res.redirect(301, helpers.urlFormat('/product/index/brand', { brand_id: brandId }));
|
|
|
}
|
|
|
})().catch(next);
|
|
|
},
|
...
|
...
|
|