Commit d105233b authored by 黄奎's avatar 黄奎

登录修改

parent bf5fbddd
...@@ -93,11 +93,14 @@ namespace EduSpider.WebApi.Controllers ...@@ -93,11 +93,14 @@ namespace EduSpider.WebApi.Controllers
if (model.AccountType == Utility.Enum.AccountTypeEnum.Teacher) if (model.AccountType == Utility.Enum.AccountTypeEnum.Teacher)
{ {
var empModel = AccountService.GetEmployeeList(new EmployeeInfo() { EmployeeName = model.AccountName, EmployeeTel = model.Account })?.FirstOrDefault(); var empModel = AccountService.GetEmployeeList(new EmployeeInfo() { EmployeeName = model.AccountName, EmployeeTel = model.Account })?.FirstOrDefault();
if (empModel != null && empModel.School_Id != 1) if (empModel != null )
{
if (empModel.School_Id == 2 || empModel.School_Id == 3)
{ {
return ApiResult.Failed(message: $"此账号【{ account }】未开通小程序功能!", new { Error = 2 }); return ApiResult.Failed(message: $"此账号【{ account }】未开通小程序功能!", new { Error = 2 });
} }
} }
}
#region 获取进阶思维小程序端token #region 获取进阶思维小程序端token
BaseUserInfo UserInfo = new() { BaseUserId = model.UniqueId }; BaseUserInfo UserInfo = new() { BaseUserId = model.UniqueId };
string token = JwtHelper.CreateToken(UserInfo, Config.JwtSecretKey, Config.JwtExpirTime); string token = JwtHelper.CreateToken(UserInfo, Config.JwtSecretKey, Config.JwtExpirTime);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment