...
|
...
|
@@ -48,7 +48,7 @@ var upDown = { |
|
|
var selectedIcon = '';
|
|
|
|
|
|
// 短信验证码的计数器,60s
|
|
|
var secondCount = 5;
|
|
|
var secondCount = 60;
|
|
|
|
|
|
// 短信验证码只能验证一次
|
|
|
var isSmsCheckedSuccessFlag = false;
|
...
|
...
|
@@ -486,7 +486,7 @@ ep.on('smsCode', function(auth) { |
|
|
function disable60sSendSmsBtn() {
|
|
|
secondCount -= 1;
|
|
|
if (secondCount < 0) {
|
|
|
secondCount = 5;
|
|
|
secondCount = 60;
|
|
|
$smsBtn.val('获取短信验证码')
|
|
|
.removeClass('second-progress')
|
|
|
.removeClass('disable');
|
...
|
...
|
@@ -509,7 +509,7 @@ function sendCaptchaSmsAsync() { |
|
|
verifyCode: $.trim($imgCaptchaInput.val())
|
|
|
}
|
|
|
}).then(function(data) {
|
|
|
if (data.captchaCount === false) {
|
|
|
if (data.captchaCount === false || data.code === 400) {
|
|
|
errTip($imgCaptchaInput, data.message);
|
|
|
ep.emit('captcha', false);
|
|
|
refreshCaptcha();
|
...
|
...
|
@@ -659,26 +659,6 @@ $smsBtn.on('mousedown', function() { |
|
|
return validateCaptchaImg(true);
|
|
|
})
|
|
|
.then(function() {
|
|
|
var defer = $.Deferred();
|
|
|
|
|
|
return $.ajax({
|
|
|
type: 'GET',
|
|
|
url: '/passport/captcha/checkSendMobile',
|
|
|
data: {
|
|
|
mobile: getMoblie()
|
|
|
}
|
|
|
}).then(function(data) {
|
|
|
if (data.code === 400) {
|
|
|
errTip($imgCaptchaInput, data.message);
|
|
|
ep.emit('captcha', false);
|
|
|
refreshCaptcha();
|
|
|
return defer.reject(false);
|
|
|
} else {
|
|
|
return true;
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
.then(function() {
|
|
|
disable60sSendSmsBtn();
|
|
|
return sendCaptchaSmsAsync();
|
|
|
});
|
...
|
...
|
|