| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>登陆</title>
- <script type="text/javascript" src="__static__/js/jquery-1.10.2.min.js"></script>
- <link rel="stylesheet" href="__static__/css/bootstrap.min.css">
- <script type="text/javascript" src="__static__/js/bootstrap.min.js"></script>
- <style>
- body{
- background: url(__static__/img/bg.png) no-repeat center center fixed;
- background-size: cover;
- }
- form{
- /* width: 400px;
- margin: 300px auto; */
- }
- form .layui-input-block{
- min-height: 30px;
- margin: 10px;
- }
- .main-box{
- position: absolute;
- cursor: move;
- top: 45%;
- left: 50%;
- margin: -200px 0 0 -180px;
- height: 450px;
- min-width: 320px;
- background: rgba(255,255,255,0.1);
- box-shadow: 1px 7px 131px #6aaae2;
- border-radius: 10px;
- padding:10px;
- }
- form input{
- background: rgba(50, 57, 70, 0.51);
- color: #ccc;
- border: 0px;
- width: 100%;
- margin: 0 auto;
- height:40px;
- border-radius: 3px;
- }
- form div{
- padding: 10px;
- }
- h1{
- text-align: center;
- margin: 20px auto;
- color: white;
- }
- </style>
- </head>
- <body>
- <div class="main-box">
- <form>
- <h1>宇结科技</h1>
- <div class="">
- <input type="text" id="username" placeholder="用户名" >
- </div>
-
-
- <div class="">
- <input type="password" id="password" placeholder="密码" >
- </div>
-
- <div style="text-align: center;">
- <button class="btn btn-default" >登陆</button>
- </div>
- </form>
- <hr>
- </div>
- <script>
- $(".btn").click(function(){
- var username = $("#username").val();
- var password = $("#password").val();
- if(username==""){
- alert("请输入用户名");
- return false;
- }
- if(password==""){
- alert("请输入密码");
- return false;
- }
- $.post("{:url('dologin')}",
- {
- username:username,
- password:password
- },
- function(data,status){
- var res=JSON.parse(data);
- if(res.status==1){
- window.location.href='{:url("index/index")}';
- }else{
- alert(res.msg);
- }
- });
- return false;
- });
- /*
- function dologin(){
- var username = $("#username").val();
- var password = $("#password").val();
- if(username==""){
- alert("请输入用户名");
- return false;
- }
- if(password==""){
- alert("请输入密码");
- return false;
- }
- $.post("{:url('dologin')}",{username:username,password:password},function(res){
- if(res.status==1){
- window.location.href='{:url("index/index")}';
- }else{
- alert(res.msg);
- }
- console.log(res);
-
- }) ;
-
- }*/
- </script>
- </body>
- </html>
|