/// <summary> /// 自定义登录 /// </summary> /// <param name="userName">账号、身份证、手机号</param> /// <param name="password"></param> /// <returns></returns> private async Task <AbpLoginResult <Tenant, User> > GetCustomLoginResultAsync(string userName, string password) { var loginResult = await _logInManager.LoginCustomAsync(userName, password); switch (loginResult.Result) { case AbpLoginResultType.Success: return(loginResult); default: throw _abpLoginResultTypeHelper.CreateExceptionForFailedLoginAttempt(loginResult.Result, userName, null); } }