| | |
| | | <html lang="zh-cn"> |
| | | |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| | | <title>视频后台管理系统</title> |
| | | <link href="css/bootstrap.min.css" rel="stylesheet"> |
| | | <link href="css/main.css" rel="stylesheet"> |
| | | <!--[if lt IE 9]> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| | | <title>视频后台管理系统</title> |
| | | <link href="css/bootstrap.min.css" rel="stylesheet"> |
| | | <link href="css/main.css" rel="stylesheet"> |
| | | <!--[if lt IE 9]> |
| | | <script src="js/html5shiv.js"></script> |
| | | <script src="js/respond.min.js"></script> |
| | | <![endif]--> |
| | | </head> |
| | | </head> |
| | | |
| | | <body background="image/airlift-bg.png"> |
| | | <h1>视频后台管理系统</h1> |
| | | <div class="shurukuang"> |
| | | <h2>用户登录</h2> |
| | | <div class="auth-form-body mt-3"> |
| | | <form role="form" class="form-horizontal"> |
| | | <label for="login_field">用户名</label> |
| | | <input autocapitalize="off" autocorrect="off" autofocus class="form-control input-block input-lg" id="account" name="account" tabindex="1" type="text" /></br> |
| | | <label for="password">密码</label> |
| | | <input class="form-control form-control input-block input-lg" id="password" name="password" tabindex="2" type="password" /> |
| | | <body background="image/airlift-bg.png"> |
| | | <h1>视频后台管理系统</h1> |
| | | <div class="shurukuang"> |
| | | <h2>用户登录</h2> |
| | | <div class="auth-form-body mt-3"> |
| | | <form role="form" class="form-horizontal"> |
| | | <label for="login_field">用户名</label> |
| | | <input autocapitalize="off" autocorrect="off" autofocus class="form-control input-block input-lg" id="account" name="account" tabindex="1" type="text" /></br> |
| | | <label for="password">密码</label> |
| | | <input class="form-control form-control input-block input-lg" id="password" name="password" tabindex="2" type="password" /> |
| | | |
| | | <div class="form-group"> |
| | | <div class="col-xs-12"> |
| | | <div class="col-xs-7" style="padding-left: 0;"> |
| | | <input class="form-control input-lg" type="text" name="verifycode" id="verifycode" placeholder="请输入验证码"> |
| | | </div> |
| | | <div class="col-xs-5" style="padding-right: 0;"> |
| | | <img class="codeimg" style="width: 100px;height: 48px;border-radius: 5px;" src="#" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="col-xs-12"> |
| | | <div class="col-xs-7" style="padding-left: 0;"> |
| | | <input class="form-control input-lg" type="text" name="verifycode" id="verifycode" placeholder="请输入验证码"> |
| | | </div> |
| | | <div class="col-xs-5" style="padding-right: 0;"> |
| | | <img class="codeimg" style="width: 100px;height: 48px;border-radius: 5px;" src="#" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </form> |
| | | <input class="btn btn-primary btn-block btn-lg submit" data-disable-with="Signing in…" name="commit" tabindex="3" type="button" value="登 录" /> |
| | | </div> |
| | | </form> |
| | | <input class="btn btn-primary btn-block btn-lg submit" data-disable-with="Signing in…" name="commit" tabindex="3" type="button" value="登 录" /> |
| | | </div> |
| | | |
| | | </div> |
| | | <script type="text/javascript" src="./js/jquery.min.js"></script> |
| | | <script type="text/javascript" src="./js/bootstrap.min.js"></script> |
| | | <script type="text/javascript" src="./layer/layer.js"></script> |
| | | <script> |
| | | $(function() { |
| | | $(".codeimg").attr("src",getSrc()); |
| | | $(".codeimg").click(function() { |
| | | $(".codeimg").attr("src", getSrc()); |
| | | }); |
| | | </div> |
| | | <script type="text/javascript" src="./js/jquery.min.js"></script> |
| | | <script type="text/javascript" src="./js/bootstrap.min.js"></script> |
| | | <script type="text/javascript" src="./layer/layer.js"></script> |
| | | <script> |
| | | $(function() { |
| | | $(".codeimg").attr("src", getSrc()); |
| | | $(".codeimg").click(function() { |
| | | $(".codeimg").attr("src", getSrc()); |
| | | }); |
| | | |
| | | $(".submit").click(function(e) { |
| | | if($("#account").val().length < 1) { |
| | | layer.msg("请输入正确的账号"); |
| | | return false; |
| | | } |
| | | $(".submit").click(function(e) { |
| | | if ($("#account").val().length < 1) { |
| | | layer.msg("请输入正确的账号"); |
| | | return false; |
| | | } |
| | | |
| | | if($("#password").val().length < 1) { |
| | | layer.msg("请输入正确的密码"); |
| | | return false; |
| | | } |
| | | if ($("#password").val().length < 1) { |
| | | layer.msg("请输入正确的密码"); |
| | | return false; |
| | | } |
| | | |
| | | if($("#verifycode").val().length < 4) { |
| | | layer.msg("请输入正确的验证码"); |
| | | return false; |
| | | } |
| | | if ($("#verifycode").val().length < 4) { |
| | | layer.msg("请输入正确的验证码"); |
| | | return false; |
| | | } |
| | | |
| | | $.post('api/login/adminLogin', { |
| | | 'username': $("#account").val(), |
| | | 'pwd': $("#password").val(), |
| | | 'code': $("#verifycode").val() |
| | | }, function(data) { |
| | | if(data.code == 0) { //登录成功 |
| | | window.location.href = "shuju.html"; |
| | | } else { |
| | | layer.msg(data.error); |
| | | } |
| | | }, "json"); |
| | | return true; |
| | | }); |
| | | }); |
| | | </script> |
| | | <script> |
| | | function getSrc(){ |
| | | return "api/validate/imgcode?temp="+new Date().getTime(); |
| | | } |
| | | |
| | | </script> |
| | | </body> |
| | | $.post('api/login/adminLogin', { |
| | | 'username': $("#account").val(), |
| | | 'pwd': $("#password").val(), |
| | | 'code': $("#verifycode").val() |
| | | }, function(data) { |
| | | if (data.code == 0) { //登录成功 |
| | | window.location.href = "shuju.html"; |
| | | } else { |
| | | layer.msg(data.error); |
| | | } |
| | | }, "json"); |
| | | return true; |
| | | }); |
| | | //点击Enter键,直接调取登录的按键函数 |
| | | $(document).keydown(function(event) { |
| | | if (event.keyCode == 13) { |
| | | // alert("回车了"); |
| | | $(".submit").click(); |
| | | }; |
| | | }); |
| | | |
| | | |
| | | }); |
| | | </script> |
| | | <script> |
| | | function getSrc() { |
| | | return "api/validate/imgcode?temp=" + new Date().getTime(); |
| | | } |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |