Authored by 陈峰

Merge branch 'hotfix/shop' into 'gray'

fix shop to mobile



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