Authored by 郭成尧

full-path

... ... @@ -29,20 +29,20 @@ const shop = {
co(function* () {
if (shopId && domain) {
return res.redirect(301, `/shop/${domain}-${shopId}.html`);
return res.redirect(301, `//m.yohobuy.com/shop/${domain}-${shopId}.html`);
}
if (shopId) {
let shopInfoApi = (yield req.ctx(shopModel).getShopInfo(shopId)) || {};
return res.redirect(301, `/shop/${_.get(shopInfoApi, 'data.shop_domain')}-${shopId}.html`);
return res.redirect(301, `//m.yohobuy.com/shop/${_.get(shopInfoApi, 'data.shop_domain')}-${shopId}.html`); // eslint-disable-line
}
if (domain) {
let domainInfo = (yield req.ctx(shopModel).getBrandLogoByDomain(domain)) || {}; // 通过域名查询店铺类型,或者品牌信息
if (domainInfo.shopId && domainInfo.type === '2') {
return res.redirect(301, `/shop/${domain}-${_.get(domainInfo, 'shopId')}.html`);
return res.redirect(301, `//m.yohobuy.com/shop/${domain}-${_.get(domainInfo, 'shopId')}.html`);
} else {
return res.redirect(301, helpers.urlFormat('/index/brand', {
brand_id: _.get(domainInfo, 'id')
... ...