You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
827 B

5 months ago
using HybirdFrameworkCore.Autofac.Attribute;
using Microsoft.AspNetCore.Http;
using System.ComponentModel;
namespace Service.Mgr
{
[Scope("SingleInstance")]
public class SysLoginMgr
{
private readonly IHttpContextAccessor _httpContextAccessor;
public SysLoginMgr(IHttpContextAccessor httpContextAccessor)
{
_httpContextAccessor = httpContextAccessor;
}
/// <summary>
/// 退出系统 🔖
/// </summary>
[DisplayName("退出系统")]
public string Logout()
{
string result = "";
if (string.IsNullOrWhiteSpace(UserManager.Account))
result = "非法操作,未登录";
_httpContextAccessor.HttpContext.SignoutToSwagger();
return result;
}
}
}