fix: 演示系统下不需要输入用户名与口令跳转到 Gitee 认证
This commit is contained in:
parent
7b2b9bfb08
commit
6fbecff864
|
@ -43,7 +43,7 @@
|
|||
}
|
||||
<div class="container">
|
||||
<input id="imgUrl" type="hidden" value="@Model.ImageLibUrl" />
|
||||
<form id="login" method="post" class="form-signin" data-demo="True">
|
||||
<form id="login" method="post" class="form-signin" data-demo="@Model.IsDemo">
|
||||
<h2 class="form-signin-heading">@Model.Title</h2>
|
||||
<div class="login-wrap" data-auth="@Model.AuthFailed" data-toggle="LgbValidate" data-valid-button="button[type='submit']">
|
||||
<div class="alert alert-danger d-none" asp-condition="@Model.AuthFailed">用户名或密码错误!</div>
|
||||
|
|
|
@ -126,10 +126,10 @@
|
|||
var $loginPwd = $('#loginPwd');
|
||||
var $loginSMS = $('#loginSMS');
|
||||
if ($login.attr('data-demo') === 'True') {
|
||||
$login.find('[data-valid="true"]').attr('data-valid', 'false');
|
||||
$login.on('submit', function (e) {
|
||||
var model = $loginType.attr('data-value');
|
||||
if (model === 'username') {
|
||||
$login.find('[data-valid="true"]').attr('data-valid', 'false');
|
||||
if ($username.val() === '' && $password.val() === '') {
|
||||
e.preventDefault();
|
||||
location.href = "Gitee";
|
||||
|
|
Loading…
Reference in New Issue