|
@@ -36,6 +36,9 @@
|
|
|
|
|
|
<div class="login-type user-login">
|
|
<div class="login-type user-login">
|
|
<form id="form_account" action="{{route('login.account')}}" method="post">
|
|
<form id="form_account" action="{{route('login.account')}}" method="post">
|
|
|
|
+ <input type="hidden" name="ticket" id="ticket">
|
|
|
|
+ <input type="hidden" name="bizState" id="bizState">
|
|
|
|
+ <input type="hidden" name="randstr" id="randstr">
|
|
{{ csrf_field() }}
|
|
{{ csrf_field() }}
|
|
<div id="account"></div>
|
|
<div id="account"></div>
|
|
<div id="message_account"></div>
|
|
<div id="message_account"></div>
|
|
@@ -170,8 +173,19 @@
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
|
|
- //
|
|
|
|
// var captcha_callback = function(res){
|
|
// var captcha_callback = function(res){
|
|
|
|
+ // if(res.hasOwnProperty('errorMessage')){
|
|
|
|
+ // alert(res.errorMessage)
|
|
|
|
+ // }
|
|
|
|
+ // if(res.ret == 0){
|
|
|
|
+ // console.log('行为验证通过');
|
|
|
|
+ // $("#ticket").val(res.ticket);
|
|
|
|
+ // $("#bizState").val(res.bizState);
|
|
|
|
+ // $("#randstr").val(res.randstr);
|
|
|
|
+ // ajax_login(1,captchaObj);
|
|
|
|
+ // }else{
|
|
|
|
+ // console.log('用户主动关闭验证码')
|
|
|
|
+ // }
|
|
// console.log('callback:', res);
|
|
// console.log('callback:', res);
|
|
// }
|
|
// }
|
|
//
|
|
//
|
|
@@ -277,9 +291,7 @@
|
|
location.href=data.data.redirect_url;
|
|
location.href=data.data.redirect_url;
|
|
},
|
|
},
|
|
error: function (errorData) {
|
|
error: function (errorData) {
|
|
- if (is_need_geetest==1){
|
|
|
|
- captchaObj.reset();
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
if (errorData.status==422) {//验证错误
|
|
if (errorData.status==422) {//验证错误
|
|
$.each(errorData.responseJSON.errors,function (key,val) {
|
|
$.each(errorData.responseJSON.errors,function (key,val) {
|
|
$("#"+key).addClass("errinfo");
|
|
$("#"+key).addClass("errinfo");
|
|
@@ -289,7 +301,6 @@
|
|
else if(errorData.status==400) {//业务错误
|
|
else if(errorData.status==400) {//业务错误
|
|
$("#message_account").addClass("errinfo");
|
|
$("#message_account").addClass("errinfo");
|
|
$("#message_account").text(errorData.responseJSON.message);
|
|
$("#message_account").text(errorData.responseJSON.message);
|
|
- is_need_geetest=errorData.responseJSON.errors.is_need_geetest;
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|