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); } } }