...
|
...
|
@@ -102,7 +102,9 @@ 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.isMiniApp = /miniProgram/i.test(req.get('User-Agent') || '') ||
|
|
|
req.query.client_type === 'miniapp' ||
|
|
|
req.cookies.app_client_type === 'miniapp';
|
|
|
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') || '');
|
...
|
...
|
|