Authored by 毕凯

Merge branch 'hotfix/verifybtnstatus' into 'release/6.0.2'

Hotfix/verifybtnstatus



See merge request !855
... ... @@ -43,19 +43,22 @@ class InternationalNew extends Page {
this.selector.clearMobile.on('click', this.clearMobile.bind(this));
this.selector.passwordEyeIcon.on('click', this.passwordShowStatus.bind(this));
this.selector.internationalLoginBtn.on('click', this.internationalLogin.bind(this));
this.selector.mobileInput.bind('input', this.changeLoginBtnStatus.bind(this));
this.selector.mobileInput.bind('input', this.changeLoginBtnStatus.bind(this, 'mobile'));
this.selector.passwordInput.bind('input', this.changeLoginBtnStatus.bind(this));
}
/**
* 改变登录按钮的状态
* which
*/
changeLoginBtnStatus() {
// 清除手机号按钮
if (this.selector.mobileInput.val()) {
this.selector.clearMobile.removeClass('hide');
} else {
this.selector.clearMobile.addClass('hide');
changeLoginBtnStatus(which) {
if (which === 'mobile') {
// 清除手机号按钮
if (this.selector.mobileInput.val()) {
this.selector.clearMobile.removeClass('hide');
} else {
this.selector.clearMobile.addClass('hide');
}
}
// 登录按钮
... ...
... ... @@ -34,7 +34,7 @@ class Login {
this.view.getPswrdBtn.on('click', this.showGetPasswordBox.bind(this));
this.view.getPasswordBox.on('click', this.hiddenGetPasswordBox.bind(this));
this.view.showYohoFamilyTip.on('click', this.showYohoFamilyTip.bind(this));
this.view.usernameInput.bind('input', this.changeBtnStatus.bind(this));
this.view.usernameInput.bind('input', this.changeBtnStatus.bind(this, 'username'));
this.view.passwordInput.bind('input', this.changeBtnStatus.bind(this));
if ($captcha.data('userverify')) {
... ... @@ -44,13 +44,17 @@ class Login {
/**
* 输入监听,改变按钮状态
* which
*/
changeBtnStatus() {
// 清除按钮
if (this.view.usernameInput.val()) {
this.view.clearUsrname.removeClass('hide');
} else {
this.view.clearUsrname.addClass('hide');
changeBtnStatus(which) {
if (which === 'username') {
// 清除按钮
if (this.view.usernameInput.val()) {
this.view.clearUsrname.removeClass('hide');
} else {
this.view.clearUsrname.addClass('hide');
}
}
// 登录按钮
... ...
... ... @@ -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');
}
}
// 登录按钮
... ...
... ... @@ -48,7 +48,7 @@ class SmsLoginNew extends Page {
*/
bindEvents() {
this.selector.clearMobile.on('click', this.clearMobile.bind(this));
this.selector.mobileInput.bind('input', this.changeBtnStatus.bind(this));
this.selector.mobileInput.bind('input', this.changeBtnStatus.bind(this, 'mobile'));
this.selector.verifyCode.bind('input', this.changeBtnStatus.bind(this));
this.selector.smsLoginBtn.on('click', this.login.bind(this));
this.selector.getPswrdBtn.on('click', this.showGetPasswordBox.bind(this));
... ... @@ -90,15 +90,18 @@ class SmsLoginNew extends Page {
/**
* 输入监听,改变按钮状态
* which
*/
changeBtnStatus() {
changeBtnStatus(which) {
// 获取验证码按钮
if (this.selector.mobileInput.val()) {
this.selector.getVerifyCodeBtn.addClass('active');
this.selector.clearMobile.removeClass('hide');
} else {
this.selector.getVerifyCodeBtn.removeClass('active');
this.selector.clearMobile.addClass('hide');
if (which === 'mobile') {
if (this.selector.mobileInput.val()) {
this.selector.getVerifyCodeBtn.addClass('active');
this.selector.clearMobile.removeClass('hide');
} else {
this.selector.getVerifyCodeBtn.removeClass('active');
this.selector.clearMobile.addClass('hide');
}
}
// 登录按钮
... ...