Authored by 郭成尧

reg-protocol

@@ -29,6 +29,10 @@ @@ -29,6 +29,10 @@
29 </div> 29 </div>
30 <input name="token" type="hidden" value="{{token}}"> 30 <input name="token" type="hidden" value="{{token}}">
31 <div data-geetest="{{useGeetest}}" id="js-img-check"{{#unless useGeetest}} class="full-img-verify"{{/unless}}></div> 31 <div data-geetest="{{useGeetest}}" id="js-img-check"{{#unless useGeetest}} class="full-img-verify"{{/unless}}></div>
  32 + <div class="protocol">
  33 + <span class="iconfont checkbox icon-cb-radio"></span>
  34 + <a href="#" title="注册协议">注册协议</a>
  35 + </div>
32 <button id="regBtn" class="reg-btn">注册</button> 36 <button id="regBtn" class="reg-btn">注册</button>
33 </div> 37 </div>
34 </div> 38 </div>
@@ -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');
@@ -151,12 +151,22 @@ $disableGray: #b0b0b0; @@ -151,12 +151,22 @@ $disableGray: #b0b0b0;
151 } 151 }
152 } 152 }
153 153
  154 + .protocol {
  155 + width: 100%;
  156 + text-align: center;
  157 +
  158 + a {
  159 + font-size: 16px;
  160 + color: #444;
  161 + }
  162 + }
  163 +
154 .reg-btn { 164 .reg-btn {
155 width: 600px; 165 width: 600px;
156 height: 70px; 166 height: 70px;
157 border-radius: 4px; 167 border-radius: 4px;
158 background-color: $disableGray; 168 background-color: $disableGray;
159 - margin-top: 40px; 169 + margin-top: 20px;
160 font-size: 32px; 170 font-size: 32px;
161 color: #fff; 171 color: #fff;
162 } 172 }