Authored by 郭成尧

oneClickforsubmitbtn

@@ -32,6 +32,8 @@ class RegisterNew { @@ -32,6 +32,8 @@ class RegisterNew {
32 32
33 validate.init(); 33 validate.init();
34 34
  35 + this.view.getVerifyCodeBtn.data('oneClick', false); // 是否点击过获取验证码按钮
  36 +
35 this.view.clearMobile.on('click', this.clearMobile.bind(this)); 37 this.view.clearMobile.on('click', this.clearMobile.bind(this));
36 this.view.regBtn.on('click', this.register.bind(this)); 38 this.view.regBtn.on('click', this.register.bind(this));
37 this.view.mobileInput.bind('input', this.changeBtnStatus.bind(this)); 39 this.view.mobileInput.bind('input', this.changeBtnStatus.bind(this));
@@ -105,7 +107,8 @@ class RegisterNew { @@ -105,7 +107,8 @@ class RegisterNew {
105 // 登录按钮 107 // 登录按钮
106 if (this.view.mobileInput.val() && 108 if (this.view.mobileInput.val() &&
107 this.view.passwordInput.val() && 109 this.view.passwordInput.val() &&
108 - this.view.verifyCodeInput.val()) { 110 + this.view.verifyCodeInput.val() &&
  111 + this.view.getVerifyCodeBtn.data('oneClick')) {
109 this.view.regBtn.addClass('active'); 112 this.view.regBtn.addClass('active');
110 } else { 113 } else {
111 this.view.regBtn.removeClass('active'); 114 this.view.regBtn.removeClass('active');
@@ -203,6 +206,8 @@ class RegisterNew { @@ -203,6 +206,8 @@ class RegisterNew {
203 return; 206 return;
204 } 207 }
205 208
  209 + this.view.getVerifyCodeBtn.data('oneClick', true);
  210 +
206 let areaCode = this.view.countryCodeSelector.val(); 211 let areaCode = this.view.countryCodeSelector.val();
207 let phoneNum = this.view.mobileInput.val(); 212 let phoneNum = this.view.mobileInput.val();
208 213
@@ -37,6 +37,7 @@ class SmsLoginNew extends Page { @@ -37,6 +37,7 @@ class SmsLoginNew extends Page {
37 init() { 37 init() {
38 validate.init(); 38 validate.init();
39 this.bindEvents(); 39 this.bindEvents();
  40 + this.selector.getVerifyCodeBtn.data('oneClick', false);
40 41
41 // 多次登录失败跳短信认证填充手机号 42 // 多次登录失败跳短信认证填充手机号
42 this.selector.mobileInput.val(localStorage.loginJumpUrl); 43 this.selector.mobileInput.val(localStorage.loginJumpUrl);
@@ -102,7 +103,9 @@ class SmsLoginNew extends Page { @@ -102,7 +103,9 @@ class SmsLoginNew extends Page {
102 } 103 }
103 104
104 // 登录按钮 105 // 登录按钮
105 - if (this.selector.mobileInput.val() && this.selector.verifyCode.val()) { 106 + if (this.selector.mobileInput.val() &&
  107 + this.selector.verifyCode.val() &&
  108 + this.selector.getVerifyCodeBtn.data('oneClick')) {
106 this.selector.smsLoginBtn.addClass('active'); 109 this.selector.smsLoginBtn.addClass('active');
107 } else { 110 } else {
108 this.selector.smsLoginBtn.removeClass('active'); 111 this.selector.smsLoginBtn.removeClass('active');
@@ -149,6 +152,8 @@ class SmsLoginNew extends Page { @@ -149,6 +152,8 @@ class SmsLoginNew extends Page {
149 return; 152 return;
150 } 153 }
151 154
  155 + this.selector.getVerifyCodeBtn.data('oneClick', true);
  156 +
152 let areaCode = this.selector.countryCodeSelector.val(); 157 let areaCode = this.selector.countryCodeSelector.val();
153 let phone = $.trim(this.selector.mobileInput.val()); 158 let phone = $.trim(this.selector.mobileInput.val());
154 159