main
洁 任 2 months ago
parent c9d826ab50
commit 1bbb6f5dac

@ -11,6 +11,7 @@ using Infrastructure.Helpers;
using SqlSugar;
using Infrastructure.Extensions;
using Infrastructure.Utilities;
using Infrastructure.Auth;
namespace OpenAuth.WebApi.Controllers
{
@ -237,6 +238,47 @@ namespace OpenAuth.WebApi.Controllers
return result;
}
//[HttpGet]
//[AllowAnonymous]
//public Response<IEnumerable<ModuleView>> Get()
//{
// var result = new Response<IEnumerable<ModuleView>>();
// try
// {
// var licenseManager = new LicenseManager();
// var trialLicense = new LicenseInfo
// {
// UserName = "testUser",
// StartTime = DateTime.Now,
// EndTime = DateTime.Now.AddDays(30), // 30天试用
// LicenseType = LicenseType.Permanent,
// HardwareId = licenseManager.GetHardwareId() // 绑定当前设备-
// // WIN-0E5RH63Q8QF 163
// //HardwareId = "WIN-D1KHS3P8VAB" 123
// //HardwareId = "WIN-0E5RH63Q8QF"
// };
// string licenseCode = licenseManager.GenerateLicense(trialLicense);
// System.IO.File.WriteAllText("E:\\低空态势感知\\code\\OpenAuth.WebApi\\license.lic", licenseCode);
// }
// catch (CommonException ex)
// {
// if (ex.Code == Define.INVALID_TOKEN)
// {
// result.Code = ex.Code;
// result.Message = ex.Message;
// }
// else
// {
// result.Code = 500;
// result.Message = ex.InnerException != null
// ? "OpenAuth.WebAPI数据库访问失败:" + ex.InnerException.Message
// : "OpenAuth.WebAPI数据库访问失败:" + ex.Message;
// }
// }
// return result;
//}
/// <summary>
/// 获取登录用户的所有可访问的模块及菜单,以树状结构返回
/// <param name="typeid">菜单类型</param>

Loading…
Cancel
Save