...
|
...
|
@@ -73,9 +73,9 @@ passport.use(new LocalStrategy({ |
|
|
console.log(errLoginTimes);
|
|
|
|
|
|
if (accountTimes >= 10) {
|
|
|
done('您的账号已被暂时锁定,请稍后再试', null);
|
|
|
done({ message: '您的账号已被暂时锁定,请稍后再试' }, null);
|
|
|
} else if (ipTimes >= 100) {
|
|
|
done('您尝试的次数过多,账号已被暂时锁定,请稍后再试', null);
|
|
|
done({ message: '您尝试的次数过多,账号已被暂时锁定,请稍后再试' }, null);
|
|
|
} else {
|
|
|
return AuthHelper.signin(area, username, password, shoppingKey).then((result) => {
|
|
|
console.log(result);
|
...
|
...
|
@@ -93,17 +93,21 @@ passport.use(new LocalStrategy({ |
|
|
|
|
|
// 再次校验
|
|
|
if (ipTimes >= 100) {
|
|
|
done('您尝试的次数过多,账号已被暂时锁定,请稍后再试', null);
|
|
|
done({ message: '您尝试的次数过多,账号已被暂时锁定,请稍后再试' }, null);
|
|
|
} else if (accountTimes >= 10) {
|
|
|
done('您的账号已被暂时锁定,请稍后再试', null);
|
|
|
done({ message: '您的账号已被暂时锁定,请稍后再试' }, null);
|
|
|
} else if (errLoginTimes >= 3) {
|
|
|
done(`您输入的密码及账户名不匹配,
|
|
|
done({
|
|
|
message: `您输入的密码及账户名不匹配,
|
|
|
是否<a href="${helpers.urlFormat('/passport/back/index')}" target="_blank">忘记密码?</a>`,
|
|
|
{ needCaptcha: true });
|
|
|
needCaptcha: true
|
|
|
});
|
|
|
} else {
|
|
|
done(`您输入的密码及账户名不匹配,
|
|
|
done({
|
|
|
message: `您输入的密码及账户名不匹配,
|
|
|
是否<a href="${helpers.urlFormat('/passport/back/index')}" target="_blank">忘记密码?</a>`,
|
|
|
{ needCaptcha: false });
|
|
|
needCaptcha: false
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
...
|
...
|
|