diff --git a/ThuInfoWeb/Controllers/HomeController.cs b/ThuInfoWeb/Controllers/HomeController.cs index 1ec09e8..1c65157 100644 --- a/ThuInfoWeb/Controllers/HomeController.cs +++ b/ThuInfoWeb/Controllers/HomeController.cs @@ -73,7 +73,7 @@ public async Task Login(LoginViewModel vm) { ModelState.AddModelError(nameof(vm.Name), "用户名或密码错误"); ModelState.AddModelError(nameof(vm.Password), "用户名或密码错误"); - loginAttemptService.RecordAttempt(model.Name); + loginAttemptService.RecordAttempt(vm.Name); return View(vm); }