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

47 lines
1.2 KiB
C#

using Estsh.Core.IServices;
using Estsh.Core.Util;
using Microsoft.AspNetCore.Mvc;
namespace Estsh.Core.Web.Controllers
{
[Route("[controller]")]
[ApiController]
public class LicenseController : Controller
{
private ILicenseService service;
public LicenseController(ILicenseService _service)
{
service = _service;
}
[HttpPost("Index")]
public IActionResult Index()
{
return View();
}
[HttpGet("GetLicenseRegistInfo")]
public IActionResult GetLicenseRegistInfo()
{
string registInfo = service.GetLicenseRegistInfo();
return Json(registInfo);
}
[HttpPost("GetLicenseInfo")]
public IActionResult GetLicenseInfo(string licenseRegistInfo, string expireTime)
{
string licenseInfo = service.GetLicenseInfo(licenseRegistInfo, expireTime);
return Json(licenseInfo);
}
[HttpPost("LicenseActivate")]
public IActionResult LicenseActivate(string licenseStr)
{
LicenseInfo licenseInfo = service.LicenseActivate(licenseStr);
return Json(licenseInfo);
}
}
}