...
|
...
|
@@ -34,7 +34,7 @@ class RegisterNew { |
|
|
|
|
|
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));
|
|
|
this.view.mobileInput.bind('input', this.changeBtnStatus.bind(this, 'mobile'));
|
|
|
this.view.verifyCodeInput.bind('input', this.changeBtnStatus.bind(this));
|
|
|
this.view.passwordInput.bind('input', this.changeBtnStatus.bind(this));
|
|
|
this.view.passwordEyeIcon.on('click', this.passwordShowStatus.bind(this));
|
...
|
...
|
@@ -91,15 +91,19 @@ class RegisterNew { |
|
|
|
|
|
/**
|
|
|
* 输入监听,改变按钮状态
|
|
|
* which
|
|
|
*/
|
|
|
changeBtnStatus() {
|
|
|
changeBtnStatus(which) {
|
|
|
|
|
|
// 获取验证码按钮
|
|
|
if (this.view.mobileInput.val()) {
|
|
|
this.view.getVerifyCodeBtn.addClass('active');
|
|
|
this.view.clearMobile.removeClass('hide');
|
|
|
} else {
|
|
|
this.view.getVerifyCodeBtn.removeClass('active');
|
|
|
this.view.clearMobile.addClass('hide');
|
|
|
if (which === 'mobile') {
|
|
|
if (this.view.mobileInput.val()) {
|
|
|
this.view.getVerifyCodeBtn.addClass('active');
|
|
|
this.view.clearMobile.removeClass('hide');
|
|
|
} else {
|
|
|
this.view.getVerifyCodeBtn.removeClass('active');
|
|
|
this.view.clearMobile.addClass('hide');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 登录按钮
|
...
|
...
|
|