diff --git a/src/blazor/admin/BootstrapAdmin.DataAccess.PetaPoco/Services/LoginService.cs b/src/blazor/admin/BootstrapAdmin.DataAccess.PetaPoco/Services/LoginService.cs
index a971afd2..f8788b05 100644
--- a/src/blazor/admin/BootstrapAdmin.DataAccess.PetaPoco/Services/LoginService.cs
+++ b/src/blazor/admin/BootstrapAdmin.DataAccess.PetaPoco/Services/LoginService.cs
@@ -1,11 +1,6 @@
-using BootstrapAdmin.Web.Core;
+using BootstrapAdmin.DataAccess.Models;
+using BootstrapAdmin.Web.Core;
using PetaPoco;
-using BootstrapAdmin.DataAccess.Models;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace BootstrapAdmin.DataAccess.PetaPoco.Services;
@@ -19,15 +14,14 @@ class LoginService : ILogin
///
///
///
- ///
///
- ///
- ///
- ///
///
+ ///
+ ///
+ ///
///
///
- public Task Log(string userName, DateTime loginTime, string IP, string address, string? browser, string userAgent, string OS, bool result)
+ public bool Log(string userName, string? IP, string? OS, string? browser, string? address, string? userAgent, bool result)
{
var loginUser = new LoginLog()
{
@@ -40,9 +34,7 @@ class LoginService : ILogin
UserAgent = userAgent,
Result = result ? "登录成功" : "登录失败"
};
-
Database.Insert(loginUser);
-
- return Task.FromResult(true);
+ return true;
}
}
diff --git a/src/blazor/admin/BootstrapAdmin.Web.Core/ILogin.cs b/src/blazor/admin/BootstrapAdmin.Web.Core/ILogin.cs
index 6ed14ad5..fff87c10 100644
--- a/src/blazor/admin/BootstrapAdmin.Web.Core/ILogin.cs
+++ b/src/blazor/admin/BootstrapAdmin.Web.Core/ILogin.cs
@@ -9,13 +9,12 @@ public interface ILogin
///
///
///
- ///
///
- ///
- ///
- ///
///
+ ///
+ ///
+ ///
///
///
- Task Log(string userName, DateTime loginTime, string IP, string address, string? browser, string userAgent, string OS, bool result);
+ bool Log(string userName, string? IP, string? OS, string? browser, string? address, string? userAgent, bool result);
}