From 7e52a3232a913e5c7660af6730c9d8b398ea0284 Mon Sep 17 00:00:00 2001
From: admin <qiutairan163@163.com>
Date: 星期三, 19 十一月 2025 13:20:02 +0800
Subject: [PATCH] Login增加密码错误次数锁定
---
Wms/Wms/Controllers/WeatherForecastController.cs | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Wms/Wms/Controllers/WeatherForecastController.cs b/Wms/Wms/Controllers/WeatherForecastController.cs
index a46ab50..4a055f9 100644
--- a/Wms/Wms/Controllers/WeatherForecastController.cs
+++ b/Wms/Wms/Controllers/WeatherForecastController.cs
@@ -59,7 +59,7 @@
{
var userId = await _userMan.LoginAdmin(model.LoginName, model.LoginPwd);
- if (userId != -1) //
+ if (userId != -1 && userId != -2) //
{
if (userId != 0) //姝g‘杩斿洖
{
@@ -77,10 +77,14 @@
throw Oops.Bah("褰撳墠璐﹀彿宸茶绂佺敤");
}
}
- else //璐﹀彿瀵嗙爜閿欒
+ else if (userId == -1) //璐﹀彿瀵嗙爜閿欒
{
throw Oops.Bah("褰撳墠璐﹀彿鎴栧瘑鐮侀敊璇�");
}
+ else
+ {
+ throw Oops.Bah("褰撳墠璐﹀彿宸茶閿佸畾锛岃鑱旂郴绠$悊鍛樺鐞�");
+ }
}
else //鏁版嵁鏍煎紡閿欒
{
--
Gitblit v1.8.0