Authored by htoooth

Merge branch 'feature/qr-code-new' into release/5.2

... ... @@ -952,24 +952,18 @@ function loginAsync() {
}
});
}).then(function(res) {
if (res.code === 200) {
if (res.data) {
location.href = res.data.session;
}
} else {
if (res.data.errorType === 'captcha') {
$captchaImgTip.removeClass('hide')
.children('em')
.html(res.message);
$captchaImgInput.addClass('error').val('');
} else {
if (currentLogin.type() === 'password') {
showPasswordTip(res.message);
$passwordInput.addClass('error').val('');
if (res.data && res.data.needCaptcha) {
showCaptchaImgPic(); // eslint-disable-line
}
} else if (currentLogin.type() === 'sms') {
showCaptchaSmsTip('短信验证码错误');
$captchaSmsInput.addClass('error').val('');
... ... @@ -977,12 +971,6 @@ function loginAsync() {
showQrCodeFailTip(QR_CODE_ERR.fail);
}
}
// 验证错误次数
if (res.data && res.data.needCaptcha) {
showCaptchaImgPic(); // eslint-disable-line
}
}
});
}
... ...