1.前後台 api 增加 hello

2.三菱模型 ID
This commit is contained in:
GiteaAdmin 2023-06-02 11:58:24 +08:00
parent 2f8124e753
commit 981d9af74d
4 changed files with 28 additions and 1 deletions

View File

@ -1,4 +1,5 @@
using Backend.Models; using Backend.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
@ -25,6 +26,17 @@ namespace Backend.Controllers
this.backendRepository = backendRepository; this.backendRepository = backendRepository;
} }
#region
[AllowAnonymous]
[HttpGet("~/hello")]
[Consumes("application/x-www-form-urlencoded")]
public ActionResult hello()
{
return Ok(System.DateTime.Now.ToString() + " OK !");
}
#endregion
public IActionResult Index() public IActionResult Index()
{ {
ViewBag.ProjectName = backendRepository.GetOneAsync<string>("select system_key from variable where deleted = 0 and system_type = 'project_name';").Result; ViewBag.ProjectName = backendRepository.GetOneAsync<string>("select system_key from variable where deleted = 0 and system_type = 'project_name';").Result;

View File

@ -280,10 +280,13 @@
// 0221 WSP // 0221 WSP
///launchViewer("dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dmVnb29nemNhdmNia2l0aHl2bHJzdnJjdGg2dHR3eWgtMjAyMzAyX2libXMvQmFucWlhbyUyMFRhaXBlaSUyME1haW4lMjBPZmZpY2UtQUxMXzAyMjEubndk") ///launchViewer("dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dmVnb29nemNhdmNia2l0aHl2bHJzdnJjdGg2dHR3eWgtMjAyMzAyX2libXMvQmFucWlhbyUyMFRhaXBlaSUyME1haW4lMjBPZmZpY2UtQUxMXzAyMjEubndk")
//2023-04-21 //2023-04-21
launchViewer("dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dmVnb29nemNhdmNia2l0aHl2bHJzdnJjdGg2dHR3eWgtMjAyMzAyX2libXMvQmFucWlhbyUyMFRhaXBlaSUyME1haW4lMjBPZmZpY2UtQUxMXzA0MjEubndk"); //launchViewer("dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dmVnb29nemNhdmNia2l0aHl2bHJzdnJjdGg2dHR3eWgtMjAyMzAyX2libXMvQmFucWlhbyUyMFRhaXBlaSUyME1haW4lMjBPZmZpY2UtQUxMXzA0MjEubndk");
//2023 - 0519 //2023 - 0519
//launchViewer("dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkxBVDNpNkI3UlVXdUY0YWNRanhjS1E_dmVyc2lvbj0x"); //launchViewer("dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkxBVDNpNkI3UlVXdUY0YWNRanhjS1E_dmVyc2lvbj0x");
//2023-05 三菱 dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6em80emd1eWFsaGpybDVvODF2YTM5cGtkZ3I4MndhbXEtbWl6dWJpc2hpLyVFMyU4MCU5MCVFNSU4RiVCMCVFNSU4QyU5NyVFNCVCOCVBRCVFOCU4RiVCMSVFNSVBNCVBNyVFNiVBOCU5MyVFMyU4MCU5MUFSQyVFOSU5QiU5OSVFNiVBOCVBMSVFNSVCQyU4RitNRVAlRTYlOEIlODYlRTclQjMlQkIlRTclQjUlQjFfJUU5JTlCJUJCJUU2JUEyJUFGJUU3JUI0JUIwJUU3JUFGJTgwJUU3JTg5JTg4Lm53ZA
launchViewer("dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6em80emd1eWFsaGpybDVvODF2YTM5cGtkZ3I4MndhbXEtbWl6dWJpc2hpLyVFMyU4MCU5MCVFNSU4RiVCMCVFNSU4QyU5NyVFNCVCOCVBRCVFOCU4RiVCMSVFNSVBNCVBNyVFNiVBOCU5MyVFMyU4MCU5MUFSQyVFOSU5QiU5OSVFNiVBOCVBMSVFNSVCQyU4RitNRVAlRTYlOEIlODYlRTclQjMlQkIlRTclQjUlQjFfJUU5JTlCJUJCJUU2JUEyJUFGJUU3JUI0JUIwJUU3JUFGJTgwJUU3JTg5JTg4Lm53ZA");
}); });
function move1Floor() { function move1Floor() {
setElevatorSpeed(0.2); setElevatorSpeed(0.2);

Binary file not shown.

View File

@ -2,8 +2,10 @@
using FrontendWebApi.Models; using FrontendWebApi.Models;
using iTextSharp.text; using iTextSharp.text;
using iTextSharp.text.pdf; using iTextSharp.text.pdf;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Newtonsoft.Json; using Newtonsoft.Json;
using NPOI.SS.UserModel; using NPOI.SS.UserModel;
@ -46,6 +48,16 @@ namespace FrontendWebApi.ApiControllers
this.backendRepository = backendRepository; this.backendRepository = backendRepository;
this.frontendRepository = frontendRepository; this.frontendRepository = frontendRepository;
} }
#region
[AllowAnonymous]
[HttpGet("~/hello")]
[Consumes("application/x-www-form-urlencoded")]
public ActionResult hello()
{
return Ok(System.DateTime.Now.ToString() + " OK !");
}
#endregion
[HttpPost] [HttpPost]
[Route("api/Login")] [Route("api/Login")]