Files
Kg.SeaTime/Service/Application.Web/Common/StateHelper.cs
Putoo 784bc66ef6 111
2026-05-20 18:32:54 +08:00

39 lines
895 B
C#

namespace Application.Web
{
public class StateHelper
{
public static bool isOnline
{
get
{
var token = App.HttpContext.GetTokenInfo();
return token != null;
}
}
public static string userId
{
get {
var token = App.HttpContext.GetTokenInfo();
return token.Claims["userId"];
}
}
public static string accId
{
get
{
var token = App.HttpContext.GetTokenInfo();
return token.Claims["accId"];
}
}
public static int areaId
{
get
{
var token = App.HttpContext.GetTokenInfo();
return Convert.ToInt32(token.Claims["areaId"]) ;
}
}
}
}