Authored by 毕凯

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

Hotfix/verifybtnstatus



See merge request !855
... ... @@ -43,20 +43,23 @@ 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() {
changeLoginBtnStatus(which) {
if (which === 'mobile') {
// 清除手机号按钮
if (this.selector.mobileInput.val()) {
this.selector.clearMobile.removeClass('hide');
} else {
this.selector.clearMobile.addClass('hide');
}
}
// 登录按钮
if (this.selector.mobileInput.val() && this.selector.passwordInput.val()) {
... ...
... ... @@ -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,14 +44,18 @@ class Login {
/**
* 输入监听,改变按钮状态
* which
*/
changeBtnStatus() {
changeBtnStatus(which) {
if (which === 'username') {
// 清除按钮
if (this.view.usernameInput.val()) {
this.view.clearUsrname.removeClass('hide');
} else {
this.view.clearUsrname.addClass('hide');
}
}
// 登录按钮
if (this.view.usernameInput.val() && this.view.passwordInput.val()) {
... ...
... ... @@ -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,9 +91,12 @@ class RegisterNew {
/**
* 输入监听,改变按钮状态
* which
*/
changeBtnStatus() {
changeBtnStatus(which) {
// 获取验证码按钮
if (which === 'mobile') {
if (this.view.mobileInput.val()) {
this.view.getVerifyCodeBtn.addClass('active');
this.view.clearMobile.removeClass('hide');
... ... @@ -101,6 +104,7 @@ class RegisterNew {
this.view.getVerifyCodeBtn.removeClass('active');
this.view.clearMobile.addClass('hide');
}
}
// 登录按钮
if (this.view.mobileInput.val() &&
... ...
... ... @@ -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,9 +90,11 @@ class SmsLoginNew extends Page {
/**
* 输入监听,改变按钮状态
* which
*/
changeBtnStatus() {
changeBtnStatus(which) {
// 获取验证码按钮
if (which === 'mobile') {
if (this.selector.mobileInput.val()) {
this.selector.getVerifyCodeBtn.addClass('active');
this.selector.clearMobile.removeClass('hide');
... ... @@ -100,6 +102,7 @@ class SmsLoginNew extends Page {
this.selector.getVerifyCodeBtn.removeClass('active');
this.selector.clearMobile.addClass('hide');
}
}
// 登录按钮
if (this.selector.mobileInput.val() && this.selector.verifyCode.val()) {
... ...