From cba0f56a335fedc89908b1c189fd1d9fe579207a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com> Date: Tue, 9 May 2023 19:41:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A6=E5=8F=B7=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E7=99=BB=E5=BD=95=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- ZR.Service/System/SysLoginService.cs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 82f0e6a..ebd2d09 100644 --- a/.gitignore +++ b/.gitignore @@ -259,7 +259,7 @@ paket-files/ # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc -/ZR.Admin.WebApi/appsettings.Stage.json +/ZR.Admin.WebApi/appsettings.Development.json /CodeGenerate /ZR.Admin.WebApi/appsettings.Production.json /ZR.Admin.WebApi/wwwroot/uploads diff --git a/ZR.Service/System/SysLoginService.cs b/ZR.Service/System/SysLoginService.cs index ec3ba38..95990ad 100644 --- a/ZR.Service/System/SysLoginService.cs +++ b/ZR.Service/System/SysLoginService.cs @@ -31,8 +31,10 @@ namespace ZR.Service.System /// public SysUser Login(LoginBodyDto loginBody, SysLogininfor logininfor) { - //密码md5 - loginBody.Password = NETCore.Encrypt.EncryptProvider.Md5(loginBody.Password); + if (loginBody.Password.Length != 32) + { + loginBody.Password = NETCore.Encrypt.EncryptProvider.Md5(loginBody.Password); + } SysUser user = SysUserService.Login(loginBody); logininfor.UserName = loginBody.Username;