Authored by 徐炜

Merge remote-tracking branch 'origin/release/4.9.2' into release/4.9.2

... ... @@ -7,6 +7,6 @@
<input id="phone-num" class="input phone-num" type="text" placeholder="手机号">
<button class="clear-input" type="button"></button>
</div>
<span id="btn-next" class="btn btn-next disable row">获取短信验证码</span>
<button id="btn-next" class="btn btn-next disable row" disabled>获取短信验证码</button>
</div>
</div>
\ No newline at end of file
... ...
... ... @@ -46,7 +46,7 @@ var page = {
});
$nextBtn.on('click', function() {
!self.disableAjax && self.submit();
self.submit();
});
$resetBtn.on('click', function() {
... ... @@ -125,7 +125,7 @@ var page = {
return;
}
$nextBtn.prop('disabled', this.disableAjax = true);
$nextBtn.prop('disabled', true);
$.get('/passport/sms_login/check.json', {
code: code
})
... ...
... ... @@ -10,7 +10,6 @@ var $countrySelect,
$phoneNum;
var page = {
disableAjax: false,
init: function() {
this.domInit();
this.bindEvent();
... ... @@ -33,7 +32,7 @@ var page = {
});
$nextBtn.on('click', function() {
!self.disableAjax && self.goNext();
self.goNext();
});
$resetBtn.on('click', function() {
... ... @@ -60,9 +59,8 @@ var page = {
goNext: function() {
var areaCode = $countrySelect.val();
var phone = $.trim($phoneNum.val());
var self = this;
if ($nextBtn.hasClass('disable')) {
if ($nextBtn.prop('disabled')) {
return;
}
... ... @@ -71,7 +69,7 @@ var page = {
return;
}
this.disableAjax = true;
$nextBtn.prop('disabled', true);
$.get('/passport/sms_login/token.json', {
area: areaCode.replace('+', ''),
mobile: phone
... ... @@ -88,7 +86,7 @@ var page = {
tip.show('出错了, 请重试');
})
.always(function() {
self.disableAjax = false;
$nextBtn.prop('disabled', false);
});
... ...
... ... @@ -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);
});
}
};
... ...
... ... @@ -138,7 +138,10 @@ body.passport-body {
background-color: #36a74c;
border-radius: 5PX;
color: #fff;
&.disable, &[disabled] {
border: none;
outline: none;
&.disable, &:disabled {
background-color: #a2a2a2;
}
}
... ...