Authored by 石坚

Merge branch 'release/1.0' of http://git.yoho.cn/fe/yoho-blk into release/1.0

 edit brand style
... ... @@ -9,12 +9,18 @@
module.exports = () => {
return (req, res, next) => {
let isMobile = /(nokia|iphone|android|ipad|motorola|^mot\-|softbank|foma|docomo|kddi|up\.browser|up\.link|htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam\-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte\-|longcos|pantech|gionee|^sie\-|portalmmm|jig\s browser|hiptop|^ucweb|^benq|haier|^lct|opera\s*mobi|opera\*mini|320x320|240x320|176x220)/i.test(req.get('user-agent')); // eslint-disable-line
let isWechat = /(MicroMessenger)/i.test(req.get('user-agent')); // eslint-disable-line
if (isMobile && req.url === '/') {
return res.redirect('//www.yohoshow.com/about/index/blkqr');
}
if (isMobile) {
// return res.redirect(`//m.yohobuy.com${req.url}`);
// http://jira.yoho.cn:8888/browse/BLK-2051
return res.redirect('//www.yohoshow.com/about/index/blkqr');
return res.redirect(`//m.yohoblk.com${req.url}`);
}
next();
};
};
... ...