...
|
...
|
@@ -91,16 +91,16 @@ const getPlatForm = (req) => { |
|
|
let userAgent = req.get('User-Agent');
|
|
|
let yoho = {};
|
|
|
let uids = req.get('User-Agent').match(/uid=([^;]+)/i);
|
|
|
let arrs=[];
|
|
|
let arrs = [];
|
|
|
let version = false;
|
|
|
const isProduction = process.env.NODE_ENV === 'production';
|
|
|
|
|
|
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);
|
|
|
if(req.query.app_version){
|
|
|
if (req.query.app_version) {
|
|
|
arrs = req.query.app_version.split('.');
|
|
|
version = arrs.length>2 && Number(arrs.slice(0,2)+ arrs[2].slice(0,1))>490;
|
|
|
version = arrs.length > 2 && Number(arrs.slice(0, 2).join('') + arrs[2].slice(0, 1)) > 490;
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
@@ -260,7 +260,7 @@ exports.index = (req, res, next) => { |
|
|
options.loginUrl = options.loginUrl + '?openby:yohobuy={"action":"go.h5","params":{"islogin":"N","url":"' + req.__USER__.http + '//m.yohobuy.com/activity/student/register"}}';
|
|
|
}
|
|
|
} else {
|
|
|
//no login
|
|
|
// no login
|
|
|
options.loginUrl = options.loginUrl + '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' + req.__USER__.http + '//m.yohobuy.com/activity/student/register"}}}';
|
|
|
}
|
|
|
} else {
|
...
|
...
|
|