Authored by 陈峰

Merge branch 'gray' into 'master'

Gray



See merge request !370
... ... @@ -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();
... ...