From 597f8e08e6264b2143454e40a7be553d1e8b6df7 Mon Sep 17 00:00:00 2001
From: sjz <1240968267@qq.com>
Date: 星期五, 09 五月 2025 17:04:19 +0800
Subject: [PATCH] 2025/5/9 沈
---
StandardInterface/MESApplication/Controllers/Base/LoginController.cs | 44 ++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/StandardInterface/MESApplication/Controllers/Base/LoginController.cs b/StandardInterface/MESApplication/Controllers/Base/LoginController.cs
index aede14c..0861d0e 100644
--- a/StandardInterface/MESApplication/Controllers/Base/LoginController.cs
+++ b/StandardInterface/MESApplication/Controllers/Base/LoginController.cs
@@ -1,9 +1,10 @@
-锘縰sing System.Dynamic;
-using MES.Service.Dto.@base;
+锘縰sing 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,43 @@
return ResponseResult.ResponseError(ex);
}
}
+
+ public class Root
+ {
+ public string version { get; set; }
+
+ public string apkUrl { get; set; }
+ }
+
+ /// <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;
+ }
+ }
+
}
\ No newline at end of file
--
Gitblit v1.9.3