Commit 7cb2724f7b878bbfcaf81c296fd96ccc3ffc3629
1 parent
09307de4
登录
Showing
3 changed files
with
52 additions
and
5 deletions
login/login.html
... | ... | @@ -16,8 +16,9 @@ |
16 | 16 | <div class="login-main"> |
17 | 17 | <div class="login-name">中兴智能日报系统</div> |
18 | 18 | <div class="login-hint">轻松工作每一天</div> |
19 | - <input type="text" class="login-username" id="login-username" placeholder="邮箱或者账户名"> | |
20 | - <input type="password" class="login-password" id="login-password" placeholder="密码"> | |
19 | + <input type="text" autocomplete=”off” class="login-username" id="login-username" placeholder="邮箱或者账户名"> | |
20 | + <input type="password" autocomplete=”off” class="login-password" id="login-password" placeholder="密码"> | |
21 | + <div class="login-errorifo" id="login-errorifo"></div> | |
21 | 22 | <div class="login-btn" id="login-btn">登录</div> |
22 | 23 | </div> |
23 | 24 | </div> |
... | ... | @@ -25,6 +26,6 @@ |
25 | 26 | |
26 | 27 | |
27 | 28 | <script src="../resource/lib/jquery/jquery.min.js"></script> |
28 | -<script src="../topages/login/login.js"></script> | |
29 | +<script src="../topages/login/login.js?a=1"></script> | |
29 | 30 | </body> |
30 | 31 | </html> |
31 | 32 | \ No newline at end of file | ... | ... |
topages/login/login.css
... | ... | @@ -32,7 +32,7 @@ html,body{ |
32 | 32 | height: 58px; |
33 | 33 | cursor: pointer; |
34 | 34 | text-align: center; |
35 | - line-height: 68px; | |
35 | + line-height: 58px; | |
36 | 36 | font-size: 20px; |
37 | 37 | color: #fff; |
38 | 38 | background: url("../../resource/img/login-btn.png") no-repeat; |
... | ... | @@ -42,4 +42,32 @@ html,body{ |
42 | 42 | width: 800px; |
43 | 43 | background: url("../../resource/img/login-bg.png") no-repeat; |
44 | 44 | background-size:100% 100% ; |
45 | -} | |
46 | 45 | \ No newline at end of file |
46 | +} | |
47 | +.login-username,.login-password{ | |
48 | + width: 400px; | |
49 | + height: 48px; | |
50 | + line-height: 48px; | |
51 | + padding-left: 20px; | |
52 | + background-color: #f2f3f4; | |
53 | + font-size: 14px; | |
54 | + color: rgba(0,0,0,.4); | |
55 | + border: 0; | |
56 | + border-radius: 25px; | |
57 | +} | |
58 | +input:focus {outline: none;} | |
59 | +input:-webkit-autofill { | |
60 | + -webkit-box-shadow: 0 0 0px 1000px white inset !important; | |
61 | +} | |
62 | +.login-username{ | |
63 | + margin: 64px 0 40px; | |
64 | +} | |
65 | +.login-errorifo{ | |
66 | + font-size: 14px; | |
67 | + color:#f94c6e ; | |
68 | + height: 14px; | |
69 | + line-height: 14px; | |
70 | + margin: 23px 0; | |
71 | +} | |
72 | +/*.login-password{*/ | |
73 | + /*margin-bottom: 60px;*/ | |
74 | +/*}*/ | |
47 | 75 | \ No newline at end of file | ... | ... |
topages/login/login.js
1 | 1 | /** |
2 | 2 | * Created by mac on 18/7/27. |
3 | 3 | */ |
4 | + | |
5 | +$('#login-btn').on('click',function () { | |
6 | + | |
7 | + var username = $.trim($('#login-username').val()); | |
8 | + var userpwd = $.trim($('#login-password').val()); | |
9 | + if(username==''||username==null||username==undefined){ | |
10 | + $('#login-errorifo').text('请输入用户名'); | |
11 | + return; | |
12 | + | |
13 | + }else{ | |
14 | + if(userpwd==''||userpwd==null||userpwd==undefined){ | |
15 | + $('#login-errorifo').text('请输入密码'); | |
16 | + | |
17 | + }else{ | |
18 | + //ajax 如果输入不正确 继续提示 。如果正确把 $('#login-errorifo').text('')清空; | |
19 | + } | |
20 | + } | |
21 | +}); | |
4 | 22 | \ No newline at end of file | ... | ... |