feat(#IVRNQ): 增加登录认证失败提示信息

#Issue
https://gitee.com/LongbowEnterprise/dashboard/issues?id=IVRNQ

#Comment
close #IVRNQ
This commit is contained in:
Argo Zhang 2019-04-23 18:46:01 +08:00
parent 2740fb7062
commit d4d536e9b6
5 changed files with 41 additions and 24 deletions

View File

@ -57,7 +57,7 @@ namespace Bootstrap.Admin.Controllers
var originUrl = Request.Query[CookieAuthenticationDefaults.ReturnUrlParameter].FirstOrDefault() ?? "~/Home/Index";
return Redirect(originUrl);
}
return View("Login", new LoginModel());
return View("Login", new LoginModel() { AuthFailed = true });
}
/// <summary>

View File

@ -19,5 +19,10 @@ namespace Bootstrap.Admin.Models
/// 验证码图床地址
/// </summary>
public string ImageLibUrl { get; protected set; }
/// <summary>
/// 是否登录认证失败
/// </summary>
public bool AuthFailed { get; set; }
}
}

View File

@ -46,6 +46,14 @@
<form id="login" method="post" class="form-signin">
<h2 class="form-signin-heading">@Model.Title</h2>
<div class="login-wrap" data-toggle="LgbValidate" data-valid-button="button[type='submit']">
@if (Model.AuthFailed)
{
<div class="alert alert-danger">用户名或密码错误!</div>
}
else
{
<div class="alert alert-success">请输入用户名与密码</div>
}
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">

View File

@ -31,12 +31,12 @@
.login-wrap {
padding: 0;
margin: 36px 0 0 370px;
margin: 12px 0 0 370px;
width: 280px;
}
.slidercaptcha {
top: -254px;
top: -282px;
left: -15px;
}
@ -44,4 +44,8 @@
width: 310px;
height: 280px;
}
.form-signin .form-group {
margin-bottom: 0.75rem;
}
}

View File

@ -14,7 +14,7 @@
.login-wrap {
padding: 20px;
height: 270px;
height: 330px;
}
.login-wrap .rememberPwd {