|
@@ -27,7 +27,8 @@ class RegisterNew { |
|
@@ -27,7 +27,8 @@ class RegisterNew { |
27
|
passwordEyeIcon: $('#passwordEyeIcon'),
|
27
|
passwordEyeIcon: $('#passwordEyeIcon'),
|
28
|
eyeClose: $('.eye-close'),
|
28
|
eyeClose: $('.eye-close'),
|
29
|
eyeOpen: $('.eye-open'),
|
29
|
eyeOpen: $('.eye-open'),
|
30
|
- tokenInput: $('input[name=token]')
|
30
|
+ tokenInput: $('input[name=token]'),
|
|
|
31
|
+ protocolCheckbox: $('.protocol .checkbox')
|
31
|
};
|
32
|
};
|
32
|
|
33
|
|
33
|
validate.init();
|
34
|
validate.init();
|
|
@@ -41,10 +42,23 @@ class RegisterNew { |
|
@@ -41,10 +42,23 @@ class RegisterNew { |
41
|
this.view.passwordInput.bind('input', this.changeBtnStatus.bind(this));
|
42
|
this.view.passwordInput.bind('input', this.changeBtnStatus.bind(this));
|
42
|
this.view.passwordEyeIcon.on('click', this.passwordShowStatus.bind(this));
|
43
|
this.view.passwordEyeIcon.on('click', this.passwordShowStatus.bind(this));
|
43
|
this.view.getVerifyCodeBtn.on('click', this.getVerifyCode.bind(this));
|
44
|
this.view.getVerifyCodeBtn.on('click', this.getVerifyCode.bind(this));
|
|
|
45
|
+ this.view.protocolCheckbox.on('click', this.changePrtclckbxStatus.bind(this));
|
44
|
|
46
|
|
45
|
}
|
47
|
}
|
46
|
|
48
|
|
47
|
/**
|
49
|
/**
|
|
|
50
|
+ * 改变用户协议勾选按钮状态
|
|
|
51
|
+ */
|
|
|
52
|
+ changePrtclckbxStatus() {
|
|
|
53
|
+ if (this.view.protocolCheckbox.hasClass('icon-cb-radio')) {
|
|
|
54
|
+ this.view.protocolCheckbox.addClass('icon-radio').removeClass('icon-cb-radio');
|
|
|
55
|
+ } else {
|
|
|
56
|
+ this.view.protocolCheckbox.addClass('icon-cb-radio').removeClass('icon-radio');
|
|
|
57
|
+ }
|
|
|
58
|
+ this.changeBtnStatus();
|
|
|
59
|
+ }
|
|
|
60
|
+
|
|
|
61
|
+ /**
|
48
|
* 清除输入的手机号
|
62
|
* 清除输入的手机号
|
49
|
*/
|
63
|
*/
|
50
|
clearMobile() {
|
64
|
clearMobile() {
|
|
@@ -118,7 +132,8 @@ class RegisterNew { |
|
@@ -118,7 +132,8 @@ class RegisterNew { |
118
|
if (this.view.mobileInput.val() &&
|
132
|
if (this.view.mobileInput.val() &&
|
119
|
this.view.passwordInput.val() &&
|
133
|
this.view.passwordInput.val() &&
|
120
|
this.view.verifyCodeInput.val() &&
|
134
|
this.view.verifyCodeInput.val() &&
|
121
|
- this.view.getVerifyCodeBtn.data('oneClick')) {
|
135
|
+ this.view.getVerifyCodeBtn.data('oneClick') &&
|
|
|
136
|
+ this.view.protocolCheckbox.hasClass('icon-cb-radio')) {
|
122
|
this.view.regBtn.addClass('active');
|
137
|
this.view.regBtn.addClass('active');
|
123
|
} else {
|
138
|
} else {
|
124
|
this.view.regBtn.removeClass('active');
|
139
|
this.view.regBtn.removeClass('active');
|