feat: DEBUG 模式下自动填充登录账号与密码
This commit is contained in:
parent
ecff092ea4
commit
0323b5ca3b
|
@ -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">
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue