Showing
3 changed files
with
20 additions
and
6 deletions
1 | -<div class="sms-login passport-page yoho-page"> | 1 | +<div class="sms-login sms-login-check passport-page yoho-page"> |
2 | {{> passport/header}} | 2 | {{> passport/header}} |
3 | <div class="content"> | 3 | <div class="content"> |
4 | <p class="sms-login-msg">验证码已发至 <span class="tel">+{{area}} {{mobile}}</span></p> | 4 | <p class="sms-login-msg">验证码已发至 <span class="tel">+{{area}} {{mobile}}</span></p> |
5 | <div class="input-container input-group sms-input row"> | 5 | <div class="input-container input-group sms-input row"> |
6 | <input id="sms-code" class="input" type="text" placeholder="验证码"> | 6 | <input id="sms-code" class="input" type="text" placeholder="验证码"> |
7 | - <span class="input-addon"> | 7 | + <div class="input-addon"> |
8 | <button type="button" id="resend-sms">重发验证码</button> | 8 | <button type="button" id="resend-sms">重发验证码</button> |
9 | - </span> | 9 | + </div> |
10 | + <button class="clear-input" type="button"></button> | ||
10 | </div> | 11 | </div> |
11 | <button id="btn-next" class="btn btn-next disable row" type="button">登录</button> | 12 | <button id="btn-next" class="btn btn-next disable row" type="button">登录</button> |
12 | </div> | 13 | </div> |
@@ -3,6 +3,7 @@ var tip = require('plugin/tip'); | @@ -3,6 +3,7 @@ var tip = require('plugin/tip'); | ||
3 | var $resendBtn, | 3 | var $resendBtn, |
4 | $nextBtn, | 4 | $nextBtn, |
5 | $smsCode, | 5 | $smsCode, |
6 | + $resetBtn, | ||
6 | mobile, area; | 7 | mobile, area; |
7 | 8 | ||
8 | var page = { | 9 | var page = { |
@@ -23,6 +24,7 @@ var page = { | @@ -23,6 +24,7 @@ var page = { | ||
23 | domInit: function() { | 24 | domInit: function() { |
24 | $resendBtn = $('#resend-sms'); | 25 | $resendBtn = $('#resend-sms'); |
25 | $nextBtn = $('#btn-next'); | 26 | $nextBtn = $('#btn-next'); |
27 | + $resetBtn = $('.clear-input'); | ||
26 | $smsCode = $('#sms-code'); | 28 | $smsCode = $('#sms-code'); |
27 | mobile = $('#mobile').val(); | 29 | mobile = $('#mobile').val(); |
28 | area = $('#area').val(); | 30 | area = $('#area').val(); |
@@ -41,11 +43,17 @@ var page = { | @@ -41,11 +43,17 @@ var page = { | ||
41 | 43 | ||
42 | $nextBtn.toggleClass('disable', !hasVal); | 44 | $nextBtn.toggleClass('disable', !hasVal); |
43 | $nextBtn.prop('disabled', !hasVal); | 45 | $nextBtn.prop('disabled', !hasVal); |
46 | + $resetBtn.toggle(hasVal); | ||
44 | }); | 47 | }); |
45 | 48 | ||
46 | $nextBtn.on('click', function() { | 49 | $nextBtn.on('click', function() { |
47 | !self.disableAjax && self.submit(); | 50 | !self.disableAjax && self.submit(); |
48 | }); | 51 | }); |
52 | + | ||
53 | + $resetBtn.on('click', function() { | ||
54 | + $smsCode.val(''); | ||
55 | + $resetBtn.hide(); | ||
56 | + }); | ||
49 | }, | 57 | }, |
50 | 58 | ||
51 | 59 |
@@ -4,10 +4,9 @@ | @@ -4,10 +4,9 @@ | ||
4 | } | 4 | } |
5 | 5 | ||
6 | #resend-sms { | 6 | #resend-sms { |
7 | - display: block; | ||
8 | background-color: transparent; | 7 | background-color: transparent; |
9 | - width: 190px; | ||
10 | - margin: 0 15PX; | 8 | + width: 148PX; |
9 | + margin: 0 15PX 0 28PX; | ||
11 | border: 1PX solid #36a74c; | 10 | border: 1PX solid #36a74c; |
12 | padding: 5PX 0; | 11 | padding: 5PX 0; |
13 | border-radius: 20PX; | 12 | border-radius: 20PX; |
@@ -20,6 +19,12 @@ | @@ -20,6 +19,12 @@ | ||
20 | } | 19 | } |
21 | } | 20 | } |
22 | 21 | ||
22 | +.sms-login-check { | ||
23 | + .clear-input { | ||
24 | + right: 175PX; | ||
25 | + } | ||
26 | +} | ||
27 | + | ||
23 | .sms-login-msg { | 28 | .sms-login-msg { |
24 | font-size: 28px; | 29 | font-size: 28px; |
25 | color: #fff; | 30 | color: #fff; |
-
Please register or login to post a comment