From cf5e996699836cc380b1cb469fea341475eb2b81 Mon Sep 17 00:00:00 2001 From: zjh <2207896513@qq.com> Date: 星期一, 30 六月 2025 15:11:41 +0800 Subject: [PATCH] 代码提交 --- StandardPda/MESApplication/Controllers/Base/LoginController.cs | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 40 insertions(+), 2 deletions(-) diff --git a/StandardPda/MESApplication/Controllers/Base/LoginController.cs b/StandardPda/MESApplication/Controllers/Base/LoginController.cs index 093741e..15cf776 100644 --- a/StandardPda/MESApplication/Controllers/Base/LoginController.cs +++ b/StandardPda/MESApplication/Controllers/Base/LoginController.cs @@ -1,9 +1,10 @@ -锘縰sing MES.Service.Dto.@base; +锘縰sing System.Dynamic; +using MES.Service.Dto.@base; using MES.Service.service; using MES.Service.util; using Microsoft.AspNetCore.Mvc; +using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using System.Dynamic; namespace MESApplication.Controllers.Base; @@ -105,4 +106,41 @@ return ResponseResult.ResponseError(ex); } } + + /// <summary> + /// 鑾峰彇App鏈�鏂扮増鏈俊鎭� + /// </summary> + /// <param name="data"></param> + /// <returns></returns> + [HttpPost("getAppUpgradeInfo")] + public async Task<ResponseResult> getAppUpgradeInfo() + { + try + { + HttpClient client = new(); + var requestUrl = + "http://192.168.1.104:8081/UpgradeInformation.json"; + var response = await client.GetAsync(requestUrl); + response.EnsureSuccessStatusCode(); // 妫�鏌TTP鐘舵�佺爜 + var responseContent = await response.Content.ReadAsStringAsync(); + var a = JsonConvert.DeserializeObject<Root>(responseContent); + return new ResponseResult + { + status = 0, + message = "OK", + data = a + }; + } + catch (Exception ex) + { + return null; + } + } + + public class Root + { + public string version { get; set; } + + public string apkUrl { get; set; } + } } \ No newline at end of file -- Gitblit v1.9.3