From a23f4d86c588a3fa0bc23e5252bc1ddd1f5a1787 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期三, 08 一月 2025 23:19:36 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_UserController.cs |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_UserController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_UserController.cs"
index 4aceb97..c03ad9c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_UserController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_UserController.cs"
@@ -29,6 +29,7 @@
         {
             _httpContextAccessor = httpContextAccessor;
         }
+
         [HttpPost, Route("swgLogin"), AllowAnonymous]
         public dynamic SwgLogin([FromBody] SwaggerLoginRequest loginRequest)
         {
@@ -39,21 +40,9 @@
 
             try
             {
-                LoginInfo loginInfo = new LoginInfo
-                {
-                    Password = loginRequest.pwd,
-                    UserName = loginRequest.name
-                };
-                var result = Service.Login(loginInfo);
-                if (result.Status)
+                if (loginRequest.name == "admin" && loginRequest.pwd == $"admin!{DateTime.Now.ToString("yyyyMMdd")}")
                 {
                     HttpContext.SuccessSwagger();
-                    Dictionary<string, object>? dict = JsonConvert.DeserializeObject<Dictionary<string, object>>(result.Data.Serialize());
-                    if (dict != null)
-                    {
-                        HttpContext.SuccessSwaggerJwt((dict.ContainsKey("token") ? dict["token"].ToString() : "") ?? "");
-                    }
-                    string str = HttpContext.GetSuccessSwaggerJwt();
                     return new { result = true };
                 }
             }
@@ -64,6 +53,7 @@
 
             return new { result = false };
         }
+
         [HttpPost, Route("login"), AllowAnonymous]
         public IActionResult Login([FromBody] LoginInfo loginInfo)
         {

--
Gitblit v1.9.3