Authored by 郭成尧

validate-refresh

... ... @@ -40,9 +40,9 @@ class RegisterNew {
this.view.passwordEyeIcon.on('click', this.passwordShowStatus.bind(this));
if ($captcha.data('geetest')) {
validate.init();
this.view.getVerifyCodeBtn.on('click', this.getVerifyCode.bind(this));
} else {
validate.init();
this.view.getVerifyCodeBtn.on('click', this.imgVerifyInit.bind(this));
}
}
... ... @@ -54,7 +54,7 @@ class RegisterNew {
if (!this.view.getVerifyCodeBtn.hasClass('active')) {
return;
}
validate.init();
validate.refresh();
$(document).off('click.refresh').on('click.refresh', '.img-check-refresh', this.imgVerifyInit.bind(this));
if (!$('#getVerifyCodeBtnByValidate').length) {
$captcha.append('<div class="validate-sub-btn"><button id="getVerifyCodeBtnByValidate">获取验证码</button></div>'); // eslint-disable-line
... ...
... ... @@ -44,9 +44,9 @@ class SmsLoginNew extends Page {
this.selector.smsLoginBtn.on('click', this.login.bind(this));
if ($captcha.data('geetest')) {
validate.init();
this.selector.getVerifyCodeBtn.on('click', this.getVerifyCode.bind(this));
} else {
validate.init();
this.selector.getVerifyCodeBtn.on('click', this.imgVerifyInit.bind(this));
}
}
... ... @@ -58,7 +58,7 @@ class SmsLoginNew extends Page {
if (!this.selector.getVerifyCodeBtn.hasClass('active')) {
return;
}
validate.init();
validate.refresh();
$(document).off('click.refresh').on('click.refresh', '.img-check-refresh', this.imgVerifyInit.bind(this));
if (!$('#getVerifyCodeBtnByValidate').length) {
$captcha.append('<div class="validate-sub-btn"><button id="getVerifyCodeBtnByValidate">获取验证码</button></div>'); // eslint-disable-line
... ...