...
|
...
|
@@ -34,6 +34,8 @@ 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.passwordInput.bind('input', this.changeBtnStatus.bind(this));
|
|
|
|
|
|
if ($captcha.data('userverify')) {
|
|
|
validate.init();
|
...
|
...
|
@@ -41,6 +43,25 @@ class Login { |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 输入监听,改变按钮状态
|
|
|
*/
|
|
|
changeBtnStatus() {
|
|
|
// 清除按钮
|
|
|
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()) {
|
|
|
this.view.loginBtn.removeClass('disable');
|
|
|
} else {
|
|
|
this.view.loginBtn.addClass('disable');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 展示弹窗
|
|
|
*/
|
|
|
showYohoFamilyTip() {
|
...
|
...
|
@@ -156,6 +177,7 @@ class Login { |
|
|
*/
|
|
|
clearUsrname() {
|
|
|
this.view.usernameInput.val('');
|
|
|
this.view.clearUsrname.addClass('hide');
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|