...
|
...
|
@@ -98,7 +98,7 @@ const getPlatForm = (req) => { |
|
|
yoho.isiOS = /\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(userAgent);
|
|
|
yoho.isAndroid = /Android/i.test(userAgent);
|
|
|
yoho.isApp = /YohoBuy/i.test(req.get('User-Agent')) || (req.query.app_version && req.query.client_type);
|
|
|
yoho.app_version = req.query.app_version || '';
|
|
|
yoho.app_version = req.get('User-Agent').match(/app_version=([^;]+)/i)||req.query.app_version || '';
|
|
|
if (yoho.app_version) {
|
|
|
arrs = yoho.app_version.split('.');
|
|
|
if (arrs.length > 2) {
|
...
|
...
|
@@ -126,6 +126,7 @@ const getPlatForm = (req) => { |
|
|
let data = yield getUser(yoho.uid);
|
|
|
|
|
|
yoho.isStudent = data.data && data.data.vip_info && data.data.vip_info.is_student ? true : false;
|
|
|
|
|
|
// yoho.isStudent = false;
|
|
|
return yoho;
|
|
|
})();
|
...
|
...
|
|