Authored by biao

update set-yoho-date for adding channel

@@ -13,11 +13,18 @@ module.exports = () => { @@ -13,11 +13,18 @@ module.exports = () => {
13 }; 13 };
14 const channel = req.query.channel || req.cookies._Channel || 'boys'; 14 const channel = req.query.channel || req.cookies._Channel || 'boys';
15 15
  16 + // 用于头部颜色控制
16 yoho.pageChannel[channel] = true; 17 yoho.pageChannel[channel] = true;
  18 +
  19 + // 当前频道设置
  20 + yoho.channel = channel;
  21 +
  22 + // 判断请求是否来自app
17 yoho.isApp = req.query.app_version || req.query.appVersion; 23 yoho.isApp = req.query.app_version || req.query.appVersion;
18 24
19 Object.assign(res.locals, yoho); 25 Object.assign(res.locals, yoho);
20 Object.assign(req.yoho, yoho); 26 Object.assign(req.yoho, yoho);
  27 +
21 next(); 28 next();
22 }; 29 };
23 }; 30 };