Authored by 郭成尧

oneClickforsubmitbtn

... ... @@ -32,6 +32,8 @@ class RegisterNew {
validate.init();
this.view.getVerifyCodeBtn.data('oneClick', false); // 是否点击过获取验证码按钮
this.view.clearMobile.on('click', this.clearMobile.bind(this));
this.view.regBtn.on('click', this.register.bind(this));
this.view.mobileInput.bind('input', this.changeBtnStatus.bind(this));
... ... @@ -105,7 +107,8 @@ class RegisterNew {
// 登录按钮
if (this.view.mobileInput.val() &&
this.view.passwordInput.val() &&
this.view.verifyCodeInput.val()) {
this.view.verifyCodeInput.val() &&
this.view.getVerifyCodeBtn.data('oneClick')) {
this.view.regBtn.addClass('active');
} else {
this.view.regBtn.removeClass('active');
... ... @@ -203,6 +206,8 @@ class RegisterNew {
return;
}
this.view.getVerifyCodeBtn.data('oneClick', true);
let areaCode = this.view.countryCodeSelector.val();
let phoneNum = this.view.mobileInput.val();
... ...
... ... @@ -37,6 +37,7 @@ class SmsLoginNew extends Page {
init() {
validate.init();
this.bindEvents();
this.selector.getVerifyCodeBtn.data('oneClick', false);
// 多次登录失败跳短信认证填充手机号
this.selector.mobileInput.val(localStorage.loginJumpUrl);
... ... @@ -102,7 +103,9 @@ class SmsLoginNew extends Page {
}
// 登录按钮
if (this.selector.mobileInput.val() && this.selector.verifyCode.val()) {
if (this.selector.mobileInput.val() &&
this.selector.verifyCode.val() &&
this.selector.getVerifyCodeBtn.data('oneClick')) {
this.selector.smsLoginBtn.addClass('active');
} else {
this.selector.smsLoginBtn.removeClass('active');
... ... @@ -149,6 +152,8 @@ class SmsLoginNew extends Page {
return;
}
this.selector.getVerifyCodeBtn.data('oneClick', true);
let areaCode = this.selector.countryCodeSelector.val();
let phone = $.trim(this.selector.mobileInput.val());
... ...