Merge branch 'hotfix/verifybtnstatus' into 'release/6.0.2'
Hotfix/verifybtnstatus See merge request !855
Showing
4 changed files
with
44 additions
and
30 deletions
@@ -43,19 +43,22 @@ class InternationalNew extends Page { | @@ -43,19 +43,22 @@ class InternationalNew extends Page { | ||
43 | this.selector.clearMobile.on('click', this.clearMobile.bind(this)); | 43 | this.selector.clearMobile.on('click', this.clearMobile.bind(this)); |
44 | this.selector.passwordEyeIcon.on('click', this.passwordShowStatus.bind(this)); | 44 | this.selector.passwordEyeIcon.on('click', this.passwordShowStatus.bind(this)); |
45 | this.selector.internationalLoginBtn.on('click', this.internationalLogin.bind(this)); | 45 | this.selector.internationalLoginBtn.on('click', this.internationalLogin.bind(this)); |
46 | - this.selector.mobileInput.bind('input', this.changeLoginBtnStatus.bind(this)); | 46 | + this.selector.mobileInput.bind('input', this.changeLoginBtnStatus.bind(this, 'mobile')); |
47 | this.selector.passwordInput.bind('input', this.changeLoginBtnStatus.bind(this)); | 47 | this.selector.passwordInput.bind('input', this.changeLoginBtnStatus.bind(this)); |
48 | } | 48 | } |
49 | 49 | ||
50 | /** | 50 | /** |
51 | * 改变登录按钮的状态 | 51 | * 改变登录按钮的状态 |
52 | + * which | ||
52 | */ | 53 | */ |
53 | - changeLoginBtnStatus() { | ||
54 | - // 清除手机号按钮 | ||
55 | - if (this.selector.mobileInput.val()) { | ||
56 | - this.selector.clearMobile.removeClass('hide'); | ||
57 | - } else { | ||
58 | - this.selector.clearMobile.addClass('hide'); | 54 | + changeLoginBtnStatus(which) { |
55 | + if (which === 'mobile') { | ||
56 | + // 清除手机号按钮 | ||
57 | + if (this.selector.mobileInput.val()) { | ||
58 | + this.selector.clearMobile.removeClass('hide'); | ||
59 | + } else { | ||
60 | + this.selector.clearMobile.addClass('hide'); | ||
61 | + } | ||
59 | } | 62 | } |
60 | 63 | ||
61 | // 登录按钮 | 64 | // 登录按钮 |
@@ -34,7 +34,7 @@ class Login { | @@ -34,7 +34,7 @@ class Login { | ||
34 | this.view.getPswrdBtn.on('click', this.showGetPasswordBox.bind(this)); | 34 | this.view.getPswrdBtn.on('click', this.showGetPasswordBox.bind(this)); |
35 | this.view.getPasswordBox.on('click', this.hiddenGetPasswordBox.bind(this)); | 35 | this.view.getPasswordBox.on('click', this.hiddenGetPasswordBox.bind(this)); |
36 | this.view.showYohoFamilyTip.on('click', this.showYohoFamilyTip.bind(this)); | 36 | this.view.showYohoFamilyTip.on('click', this.showYohoFamilyTip.bind(this)); |
37 | - this.view.usernameInput.bind('input', this.changeBtnStatus.bind(this)); | 37 | + this.view.usernameInput.bind('input', this.changeBtnStatus.bind(this, 'username')); |
38 | this.view.passwordInput.bind('input', this.changeBtnStatus.bind(this)); | 38 | this.view.passwordInput.bind('input', this.changeBtnStatus.bind(this)); |
39 | 39 | ||
40 | if ($captcha.data('userverify')) { | 40 | if ($captcha.data('userverify')) { |
@@ -44,13 +44,17 @@ class Login { | @@ -44,13 +44,17 @@ class Login { | ||
44 | 44 | ||
45 | /** | 45 | /** |
46 | * 输入监听,改变按钮状态 | 46 | * 输入监听,改变按钮状态 |
47 | + * which | ||
47 | */ | 48 | */ |
48 | - changeBtnStatus() { | ||
49 | - // 清除按钮 | ||
50 | - if (this.view.usernameInput.val()) { | ||
51 | - this.view.clearUsrname.removeClass('hide'); | ||
52 | - } else { | ||
53 | - this.view.clearUsrname.addClass('hide'); | 49 | + changeBtnStatus(which) { |
50 | + | ||
51 | + if (which === 'username') { | ||
52 | + // 清除按钮 | ||
53 | + if (this.view.usernameInput.val()) { | ||
54 | + this.view.clearUsrname.removeClass('hide'); | ||
55 | + } else { | ||
56 | + this.view.clearUsrname.addClass('hide'); | ||
57 | + } | ||
54 | } | 58 | } |
55 | 59 | ||
56 | // 登录按钮 | 60 | // 登录按钮 |
@@ -34,7 +34,7 @@ class RegisterNew { | @@ -34,7 +34,7 @@ class RegisterNew { | ||
34 | 34 | ||
35 | this.view.clearMobile.on('click', this.clearMobile.bind(this)); | 35 | this.view.clearMobile.on('click', this.clearMobile.bind(this)); |
36 | this.view.regBtn.on('click', this.register.bind(this)); | 36 | this.view.regBtn.on('click', this.register.bind(this)); |
37 | - this.view.mobileInput.bind('input', this.changeBtnStatus.bind(this)); | 37 | + this.view.mobileInput.bind('input', this.changeBtnStatus.bind(this, 'mobile')); |
38 | this.view.verifyCodeInput.bind('input', this.changeBtnStatus.bind(this)); | 38 | this.view.verifyCodeInput.bind('input', this.changeBtnStatus.bind(this)); |
39 | this.view.passwordInput.bind('input', this.changeBtnStatus.bind(this)); | 39 | this.view.passwordInput.bind('input', this.changeBtnStatus.bind(this)); |
40 | this.view.passwordEyeIcon.on('click', this.passwordShowStatus.bind(this)); | 40 | this.view.passwordEyeIcon.on('click', this.passwordShowStatus.bind(this)); |
@@ -91,15 +91,19 @@ class RegisterNew { | @@ -91,15 +91,19 @@ class RegisterNew { | ||
91 | 91 | ||
92 | /** | 92 | /** |
93 | * 输入监听,改变按钮状态 | 93 | * 输入监听,改变按钮状态 |
94 | + * which | ||
94 | */ | 95 | */ |
95 | - changeBtnStatus() { | 96 | + changeBtnStatus(which) { |
97 | + | ||
96 | // 获取验证码按钮 | 98 | // 获取验证码按钮 |
97 | - if (this.view.mobileInput.val()) { | ||
98 | - this.view.getVerifyCodeBtn.addClass('active'); | ||
99 | - this.view.clearMobile.removeClass('hide'); | ||
100 | - } else { | ||
101 | - this.view.getVerifyCodeBtn.removeClass('active'); | ||
102 | - this.view.clearMobile.addClass('hide'); | 99 | + if (which === 'mobile') { |
100 | + if (this.view.mobileInput.val()) { | ||
101 | + this.view.getVerifyCodeBtn.addClass('active'); | ||
102 | + this.view.clearMobile.removeClass('hide'); | ||
103 | + } else { | ||
104 | + this.view.getVerifyCodeBtn.removeClass('active'); | ||
105 | + this.view.clearMobile.addClass('hide'); | ||
106 | + } | ||
103 | } | 107 | } |
104 | 108 | ||
105 | // 登录按钮 | 109 | // 登录按钮 |
@@ -48,7 +48,7 @@ class SmsLoginNew extends Page { | @@ -48,7 +48,7 @@ class SmsLoginNew extends Page { | ||
48 | */ | 48 | */ |
49 | bindEvents() { | 49 | bindEvents() { |
50 | this.selector.clearMobile.on('click', this.clearMobile.bind(this)); | 50 | this.selector.clearMobile.on('click', this.clearMobile.bind(this)); |
51 | - this.selector.mobileInput.bind('input', this.changeBtnStatus.bind(this)); | 51 | + this.selector.mobileInput.bind('input', this.changeBtnStatus.bind(this, 'mobile')); |
52 | this.selector.verifyCode.bind('input', this.changeBtnStatus.bind(this)); | 52 | this.selector.verifyCode.bind('input', this.changeBtnStatus.bind(this)); |
53 | this.selector.smsLoginBtn.on('click', this.login.bind(this)); | 53 | this.selector.smsLoginBtn.on('click', this.login.bind(this)); |
54 | this.selector.getPswrdBtn.on('click', this.showGetPasswordBox.bind(this)); | 54 | this.selector.getPswrdBtn.on('click', this.showGetPasswordBox.bind(this)); |
@@ -90,15 +90,18 @@ class SmsLoginNew extends Page { | @@ -90,15 +90,18 @@ class SmsLoginNew extends Page { | ||
90 | 90 | ||
91 | /** | 91 | /** |
92 | * 输入监听,改变按钮状态 | 92 | * 输入监听,改变按钮状态 |
93 | + * which | ||
93 | */ | 94 | */ |
94 | - changeBtnStatus() { | 95 | + changeBtnStatus(which) { |
95 | // 获取验证码按钮 | 96 | // 获取验证码按钮 |
96 | - if (this.selector.mobileInput.val()) { | ||
97 | - this.selector.getVerifyCodeBtn.addClass('active'); | ||
98 | - this.selector.clearMobile.removeClass('hide'); | ||
99 | - } else { | ||
100 | - this.selector.getVerifyCodeBtn.removeClass('active'); | ||
101 | - this.selector.clearMobile.addClass('hide'); | 97 | + if (which === 'mobile') { |
98 | + if (this.selector.mobileInput.val()) { | ||
99 | + this.selector.getVerifyCodeBtn.addClass('active'); | ||
100 | + this.selector.clearMobile.removeClass('hide'); | ||
101 | + } else { | ||
102 | + this.selector.getVerifyCodeBtn.removeClass('active'); | ||
103 | + this.selector.clearMobile.addClass('hide'); | ||
104 | + } | ||
102 | } | 105 | } |
103 | 106 | ||
104 | // 登录按钮 | 107 | // 登录按钮 |
-
Please register or login to post a comment