From d0f01f571918ae942349068776fa7fb70f3ab5cd Mon Sep 17 00:00:00 2001 From: hutongqing <hutongqing@hnkhzn.com> Date: 星期三, 28 八月 2024 16:20:18 +0800 Subject: [PATCH] 更新设备信息表从表导入问题 --- WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_UserController.cs | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-) diff --git a/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_UserController.cs b/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_UserController.cs index ad05229..4d1ac2b 100644 --- a/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_UserController.cs +++ b/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_UserController.cs @@ -42,7 +42,7 @@ [HttpPost, Route("modifyPwd")] public IActionResult ModifyPwd(string oldPwd, string newPwd) { - return Json( Service.ModifyPwd(oldPwd, newPwd)); + return Json(Service.ModifyPwd(oldPwd, newPwd)); } [HttpGet, Route("getVierificationCode"), AllowAnonymous] @@ -63,5 +63,32 @@ { return WebResponseContent.Instance.OK(data: JwtHelper.SerializeJwt(code)); } + [HttpPost, Route("replaceToken")] + public WebResponseContent ReplaceToken() + { + WebResponseContent responseContent = new WebResponseContent(); + try + { + string token = App.User.GetToken(); + if (string.IsNullOrEmpty(token)) + { + return responseContent = WebResponseContent.Instance.Error("token鏃犳晥锛岃閲嶆柊鐧诲綍锛�"); + } + TokenModelJwt tokenModelJwt = new TokenModelJwt() + { + RoleId = App.User.RoleId, + TenantId = App.User.TenantId, + UserId = App.User.UserId, + UserName = App.User.UserName + }; + string newToken = JwtHelper.IssueJwt(tokenModelJwt); + return responseContent = WebResponseContent.Instance.OK(data: newToken); + } + catch (Exception ex) + { + return responseContent.Error(ex.Message); + } + + } } } -- Gitblit v1.9.3