修复路由切换问题

This commit is contained in:
陈淳
2022-10-29 10:33:08 +08:00
parent c901b4bc06
commit d6fd02ec19
9 changed files with 854 additions and 278 deletions

View File

@@ -230,7 +230,15 @@ namespace Yi.Framework.WebCore
public static LoginLogEntity GetLoginLogInfo(this HttpContext context)
{
var ipAddr = context.GetClientIp();
var location = IpTool.Search(ipAddr);
IpInfo location;
if (ipAddr == "127.0.0.1")
{
location = new IpInfo() { Province = "本地", City = "本机" };
}
else
{
location = IpTool.Search(ipAddr);
}
ClientInfo clientInfo = context.GetClientInfo();
LoginLogEntity entity = new()
{