From 93473e2792e5d23a168e575f17190a5e51ad7c9f Mon Sep 17 00:00:00 2001 From: 啊鑫 <t2856754968@163.com> Date: 星期四, 17 七月 2025 09:55:58 +0800 Subject: [PATCH] 111 --- MESApplication/Controllers/Base/LoginController.cs | 33 +++++++++++++++++---------------- 1 files changed, 17 insertions(+), 16 deletions(-) diff --git a/MESApplication/Controllers/Base/LoginController.cs b/MESApplication/Controllers/Base/LoginController.cs index 5ee0e8d..4a907d4 100644 --- a/MESApplication/Controllers/Base/LoginController.cs +++ b/MESApplication/Controllers/Base/LoginController.cs @@ -1,22 +1,22 @@ -锘縰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; /// <summary> -/// 鐢ㄦ埛 +/// 鐢ㄦ埛 /// </summary> [Route("api/[controller]")] [ApiController] public class LoginController : ControllerBase { /// <summary> - /// 鐧诲綍 + /// 鐧诲綍 /// </summary> /// <param name="model"></param> /// <returns></returns> @@ -27,7 +27,8 @@ try { dynamic resultInfos = new ExpandoObject(); - var tbBillList = new LoginService().login(model.userID, model.userPass); + var tbBillList = + new LoginService().login(model.userID, model.userPass); resultInfos.tbBillList = tbBillList; return new ResponseResult { @@ -43,7 +44,7 @@ } /// <summary> - /// 閲嶈瀵嗙爜 + /// 閲嶈瀵嗙爜 /// </summary> /// <param name="data"></param> /// <returns></returns> @@ -80,7 +81,7 @@ } /// <summary> - /// 鐢ㄦ埛鑿滃崟 + /// 鐢ㄦ埛鑿滃崟 /// </summary> /// <param name="data"></param> /// <returns></returns> @@ -105,25 +106,19 @@ return ResponseResult.ResponseError(ex); } } - public class Root - { - public string version { get; set; } - public string apkUrl { get; set; } - } /// <summary> - /// 鑾峰彇App鏈�鏂扮増鏈俊鎭� + /// 鑾峰彇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.92:8282/UpgradeInformation.json"; + var requestUrl = "http://192.168.1.92:8282/UpgradeInformation.json"; var response = await client.GetAsync(requestUrl); response.EnsureSuccessStatusCode(); // 妫�鏌TTP鐘舵�佺爜 var responseContent = await response.Content.ReadAsStringAsync(); @@ -134,11 +129,17 @@ 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