...
|
...
|
@@ -5,8 +5,6 @@ var $eyeBtn, |
|
|
$nextBtn;
|
|
|
|
|
|
var page = {
|
|
|
disableAjax: false,
|
|
|
|
|
|
init: function() {
|
|
|
this.domInit();
|
|
|
this.bindEvent();
|
...
|
...
|
@@ -24,7 +22,7 @@ var page = { |
|
|
});
|
|
|
|
|
|
$nextBtn.on('click', function() {
|
|
|
!self.disableAjax && self.setPasswordAndLogin();
|
|
|
self.setPasswordAndLogin();
|
|
|
});
|
|
|
|
|
|
$pwd.on('input', function() {
|
...
|
...
|
@@ -32,7 +30,7 @@ var page = { |
|
|
|
|
|
$nextBtn
|
|
|
.toggleClass('disable', !bool)
|
|
|
.prop('disable', !bool);
|
|
|
.prop('disabled', !bool);
|
|
|
});
|
|
|
},
|
|
|
|
...
|
...
|
@@ -46,10 +44,13 @@ var page = { |
|
|
},
|
|
|
|
|
|
setPasswordAndLogin: function() {
|
|
|
var self = this;
|
|
|
var password = $.trim($pwd.val());
|
|
|
|
|
|
this.disableAjax = true;
|
|
|
if ($nextBtn.prop('disabled')) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
$nextBtn.prop('disabled', true);
|
|
|
$.post('/passport/sms_login/password.json', {
|
|
|
password: password
|
|
|
})
|
...
|
...
|
@@ -66,7 +67,7 @@ var page = { |
|
|
tip.show('出错了, 请重试');
|
|
|
})
|
|
|
.always(function() {
|
|
|
self.disableAjax = false;
|
|
|
$nextBtn.prop('disabled', false);
|
|
|
});
|
|
|
}
|
|
|
};
|
...
|
...
|
|