feat: DEBUG 模式下自动填充登录账号与密码

This commit is contained in:
Argo-Tianyi 2022-01-05 03:47:06 +08:00
parent ecff092ea4
commit 0323b5ca3b
2 changed files with 11 additions and 2 deletions

View File

@ -14,11 +14,11 @@
{
<BootstrapInputGroup>
<BootstrapInputGroupIcon Icon="fa fa-fw fa-user" />
<BootstrapInput TValue="string" name="userName" maxlength="16" IsAutoFocus="true" PlaceHolder="用户名" />
<BootstrapInput TValue="string" name="userName" maxlength="16" Value="@UserName" IsAutoFocus="true" PlaceHolder="用户名" />
</BootstrapInputGroup>
<BootstrapInputGroup class="mt-3">
<BootstrapInputGroupIcon Icon="fa fa-fw fa-lock" />
<BootstrapPassword name="password" PlaceHolder="密码" />
<BootstrapPassword name="password" PlaceHolder="密码" Value="@Password" />
</BootstrapInputGroup>
}
<div class="d-flex justify-content-between mt-3">

View File

@ -27,6 +27,10 @@ public partial class Login
[NotNull]
private IDict? DictsService { get; set; }
private string? UserName { get; set; }
private string? Password { get; set; }
/// <summary>
///
/// </summary>
@ -37,6 +41,11 @@ public partial class Login
Title = DictsService.GetWebTitle();
PostUrl = QueryHelper.AddQueryString("/Account/Login", "ReturnUrl", ReturnUrl ?? "");
#if DEBUG
UserName = "Admin";
Password = "123789";
#endif
}
void OnClickSwitchButton()