初始化

This commit is contained in:
2025-11-20 14:07:55 +08:00
commit b9b1ff5ed4
318 changed files with 42662 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using ViewModels;
using WebAPIServer.Common;
namespace WebAPIServer.Controllers
{
[Route("api/[controller]/[action]")]
[ApiController]
public class ValuesController : ControllerBase
{
[HttpGet()]
public ReturnInfo GetAll_WebApiMethod(string VariableName)
{
ReturnInfo i = new ReturnInfo();
i.isok = true;
try
{
var result = StaticData.scope.GetVariable(VariableName);
i.response = result;
}
catch (Exception ex)
{
i.isok = false;
i.message = ex.Message;
}
return i;
}
[HttpPost()]
public ReturnInfo UpdateData()
{
ReturnInfo i = new ReturnInfo();
i.isok = true;
try
{
StaticData.GetWebAPIMethod();
i.response = "sucess";
}
catch (Exception ex)
{
i.isok = false;
i.message = ex.Message;
}
return i;
}
}
}