增加功能:移动端增加滑块验证码 link #IRWNP

#Issue
https://gitee.com/LongbowEnterprise/dashboard/issues?id=IRWNP
This commit is contained in:
Argo Zhang 2019-03-14 15:40:30 +08:00
parent d2cb480c97
commit a8e0f10446
3 changed files with 18 additions and 10 deletions

View File

@ -33,6 +33,12 @@
padding: 0;
margin: 36px 0 0 370px;
width: 280px;
height: 200px;
}
.slidercaptcha {
top: -254px;
left: -15px;
width: 310px;
height: 280px;
}
}

View File

@ -14,6 +14,7 @@
.login-wrap {
padding: 20px;
height: 270px;
}
.login-wrap .rememberPwd {
@ -57,14 +58,13 @@
.slidercaptcha {
display: none;
position: relative;
bottom: 254px;
background-color: #00adec;
width: 310px;
height: 280px;
border-radius: 4px;
left: -10px;
box-shadow: 0 0 10px #fff;
left: 0;
right: 0;
top: -232px;
height: 234px;
}
.slidercaptcha canvas:first-child {

View File

@ -58,15 +58,17 @@
});
$('button[type="submit"]').on('click', function(e){
if ($.browser.versions.mobile) return true;
//if ($.browser.versions.mobile) return true;
$captcha.addClass('d-block');
return false;
});
$('#captcha').sliderCaptcha({
//setSrc: function() {
// return '../images/pic/280/150/Pic' + Math.round(Math.random() * 136) + '.jpg'
//},
width: $(window).width() < 768 ? 216 : 280,
height: $(window).width() < 768 ? 110 : 150,
setSrc: function() {
return '../images/pic/280/150/Pic' + Math.round(Math.random() * 136) + '.jpg'
},
onSuccess: function () {
$('form').submit();
}