From 964b796bb505b036953d16b652c66b03e3616d23 Mon Sep 17 00:00:00 2001
From: cnf <3200815559@qq.com>
Date: 星期三, 07 五月 2025 15:27:14 +0800
Subject: [PATCH] 接口完善

---
 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