...
|
...
|
@@ -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();
|
...
|
...
|
|