添加项目文件。
This commit is contained in:
30
TechHelper.Client/Pages/Author/ForgotPassword.razor.cs
Normal file
30
TechHelper.Client/Pages/Author/ForgotPassword.razor.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Entities.DTO;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using TechHelper.Client.HttpRepository;
|
||||
|
||||
namespace TechHelper.Client.Pages.Author
|
||||
{
|
||||
public partial class ForgotPassword
|
||||
{
|
||||
private ForgotPasswordDto _forgotPassDto = new ForgotPasswordDto();
|
||||
|
||||
private bool _showSuccess;
|
||||
private bool _showError;
|
||||
|
||||
[Inject]
|
||||
public IAuthenticationClientService AuthenticationClientService { get; set; }
|
||||
|
||||
private async Task Submit()
|
||||
{
|
||||
_showError = _showSuccess = false;
|
||||
|
||||
var result = await AuthenticationClientService.ForgotPasswordAsync(_forgotPassDto);
|
||||
if (result == System.Net.HttpStatusCode.OK)
|
||||
{
|
||||
_showSuccess = true;
|
||||
}
|
||||
_showError = true;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user