...
|
...
|
@@ -102,10 +102,12 @@ app.use((req, res, next) => { |
|
|
req.app.locals.wap = app.locals.wap; // zookeper对象赋值
|
|
|
|
|
|
// 判断请求是否来自app
|
|
|
req.yoho.isMiniApp = /miniProgram/i.test(req.get('User-Agent') || '');
|
|
|
req.yoho.isNowApp = /yohonow/i.test(req.get('User-Agent') || '');
|
|
|
req.yoho.isMarsApp = /yohomars/i.test(req.get('User-Agent') || '');
|
|
|
req.yoho.isYohoApp = /YohoBuy/i.test(req.get('User-Agent') || '');
|
|
|
req.yoho.isApp = req.yoho.isMarsApp ||
|
|
|
req.yoho.isApp = req.yoho.isMiniApp ||
|
|
|
req.yoho.isMarsApp ||
|
|
|
req.cookies.app_version ||
|
|
|
req.yoho.isNowApp ||
|
|
|
/YohoBuy/i.test(req.get('User-Agent') || '') ||
|
...
|
...
|
|