|
|
@@ -80,7 +80,14 @@ public class LoginController extends BaseController {
|
|
|
try {
|
|
|
return success(loginService.loginByPassword(loginParam));
|
|
|
} catch (PasswordErrorException e) {
|
|
|
- return error(e.getMessage()).addAttribute("errorCount", e.getCount());
|
|
|
+ int count = e.getCount();
|
|
|
+ String msg = e.getMessage();
|
|
|
+ if (count >= 3 && count < 5) {
|
|
|
+ msg = "当前已输错密码" + count + "次,若达到5次今日将无法登录";
|
|
|
+ } else if (count >= 5) {
|
|
|
+ msg = "密码错误次数已达上限,今日无法登录";
|
|
|
+ }
|
|
|
+ return error(msg).addAttribute("errorCount", count);
|
|
|
}
|
|
|
}
|
|
|
|