From ea4002e9f17e4659cf1905250780f5e0a5b17473 Mon Sep 17 00:00:00 2001
From: hao <1836460075@qq.com>
Date: 星期四, 19 六月 2025 16:37:56 +0800
Subject: [PATCH] 1
---
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..acf859e 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.22:8088/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