Authored by 郭成尧

changeBtnStatus

... ... @@ -17,7 +17,7 @@
</div>
<div class="form-group verify-code">
<label for="verifyCode" class="iconfont">&#xe71c;</label><input type="text" name="verifyCode" placeholder="请输入验证码"
class="verify-code-input"><button id="getVerifyCodeBtn" class="get-verify-code active">获取验证码</button>
class="verify-code-input"><button id="getVerifyCodeBtn" class="get-verify-code">获取验证码</button>
</div>
<div class="form-group password">
<label for="password" class="iconfont">&#xe723;</label><input type="password" name="password" placeholder="请输入密码">
... ...
... ... @@ -34,9 +34,9 @@ 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.changeRegBtnStatus.bind(this));
this.view.inviteCodeInput.bind('input', this.changeRegBtnStatus.bind(this));
this.view.passwordInput.bind('input', this.changeRegBtnStatus.bind(this));
this.view.mobileInput.bind('input', this.changeBtnStatus.bind(this));
this.view.inviteCodeInput.bind('input', this.changeBtnStatus.bind(this));
this.view.passwordInput.bind('input', this.changeBtnStatus.bind(this));
this.view.passwordEyeIcon.on('click', this.passwordShowStatus.bind(this));
if ($captcha.data('geetest')) {
... ... @@ -107,9 +107,17 @@ class RegisterNew {
}
/**
* 改变登录按钮状态
* 输入监听,改变按钮状态
*/
changeRegBtnStatus() {
changeBtnStatus() {
// 获取验证码按钮
if (this.view.mobileInput.val()) {
this.view.getVerifyCodeBtn.addClass('active');
} else {
this.view.getVerifyCodeBtn.removeClass('active');
}
// 登录按钮
if (this.view.mobileInput.val() &&
this.view.passwordInput.val() &&
this.view.verifyCodeInput.val()) {
... ...