Authored by 王水玲

国际账号登录修改

... ... @@ -33,7 +33,7 @@ passport.use(new LocalStrategy({
passReqToCallback: true
}, (req, username, password, done) => {
let area = req.body.area || '86';
let area = req.body.areaCode || '86';
if (isNaN(parseInt(area, 0)) || _.isEmpty(username) || _.isEmpty(password)) {
logger.info(`【Passport Loginbad params, area:${area} account:${username} password:${password}`);
... ... @@ -41,7 +41,9 @@ passport.use(new LocalStrategy({
}
let verifyEmail = helpers.verifyEmail(username);
let verifyMobile = helpers.verifyAreaMobile(username, area);
// 国际号码验证取消
let verifyMobile = area === '86' ? helpers.verifyAreaMobile(area + '-' + username) : true;
if (!verifyEmail && !verifyMobile) {
logger.info(`【Passport Loginbad account, email:${verifyEmail} mobile:${verifyMobile}`);
... ...