Authored by 陈峰

Merge branch 'hotfix/shop' into 'gray'

fix shop to mobile



See merge request !369
... ... @@ -13,8 +13,13 @@ module.exports = () => {
if (req.noRefer) {
res.locals.mobileRefer = '';
} else if (req.isMobile) {
const redirect = `//m.yohobuy.com${req.url}?${querystring.stringify(req.query || {})}`;
if (req.shopRedirect) {
return res.redirect(redirect);
}
return res.redirect(req.mobileUrl || res.locals.mobileRefer ||
`//m.yohobuy.com${req.url}?${querystring.stringify(req.query)}`);
redirect);
}
return next();
... ...