Authored by Aiden Xu

分期订单

... ... @@ -134,10 +134,17 @@ Timer.prototype.reset = function() {
* 点击发送短信事件
*/
$('#send-sms').click(function() {
var self = this;
if ($(this).data('running')) {
return false;
}
$.get('/home/installment/starting-service/verify-code', {
mobile: formModel.mobile
}).then(function(result) {
if (result.code === 200) {
$(self).data('running', true);
new Timer().startCountdown(function() {
}, function(counter) {
// 进度回调
... ... @@ -145,10 +152,12 @@ $('#send-sms').click(function() {
}, function() {
// 倒计时结束后再次显示 "获取验证码"
$('#send-sms').text('获取验证码');
$(self).data('running', false);
});
} else {
tip.show(result.message);
$(self).data('running', false);
}
});
... ...