修改授权方式为手机号码和验证码方式

测试出的问题修复
This commit is contained in:
范露尧
2023-07-12 16:11:42 +08:00
parent fbbabeb690
commit 589b8a0132
86 changed files with 365 additions and 120 deletions

View File

@@ -156,8 +156,8 @@ namespace Ewide.Core.Service
// 判断用户名和密码是否正确
var user = await _sysUserRep.FirstOrDefaultAsync(u => (u.Account.Equals(input.Account) || u.Phone.Equals(input.Account) || u.Email.Equals(input.Account)) && u.Password.Equals(encryptPasswod));
_ = user ?? throw Oops.Oh(ErrorCode.D1000);
#endif
#endif
_ = user ?? throw Oops.Oh(ErrorCode.D1000);
// 验证账号是否被冻结
if (user.Status == CommonStatus.DISABLE)
throw Oops.Oh(ErrorCode.D1017);
@@ -176,6 +176,7 @@ namespace Ewide.Core.Service
{ ClaimConst.CLAINM_ACCOUNT, user.Account },
{ ClaimConst.CLAINM_NAME, user.Name },
{ ClaimConst.CLAINM_SUPERADMIN, user.AdminType },
{ ClaimConst.ExpireTime,DateTime.Now.AddHours(2)},
});
// 设置Swagger自动登录