123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- <!DOCTYPE html>
- <html lang="zh">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>login</title>
- <link rel="stylesheet" type="text/css" href="css/bootstrap-grid.min.css"/><!--CSS RESET-->
- <link href="http://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
- <link rel="stylesheet" type="text/css" href="css/htmleaf-demo.css"><!--演示页面样式,使用时可以不引用-->
- <!--<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>-->
- <script src="./js/jquery-2.1.1.min.js"></script>
- <script src="./js/jqhttpsdk.js"></script>
- <script src="./js/jquery_cookie_min.js"></script>
- <script src="./js/jkcor.js"></script>
- <style>
- .demo {
- padding: 20px 0;
- background: linear-gradient(to right, #7AB6B6 50%, #E5CFAA 50%);
- }
- .form-horizontal {
- background-color: #fff;
- font-family: 'Arimo', sans-serif;
- text-align: center;
- padding: 50px 30px 50px;
- box-shadow: 12px 12px 0 0 rgba(0, 0, 0, 0.3);
- }
- .form-horizontal .heading {
- color: #555;
- font-size: 30px;
- font-weight: 600;
- letter-spacing: 1px;
- text-transform: capitalize;
- margin: 0 0 50px 0;
- }
- .form-horizontal .form-group {
- margin: 0 auto 30px;
- position: relative;
- }
- .form-horizontal .form-group:nth-last-child(2) {
- margin-bottom: 20px;
- }
- .form-horizontal .form-group:last-child {
- margin: 0;
- }
- .form-horizontal .form-group > i {
- color: #999;
- transform: translateY(-50%);
- position: absolute;
- left: 5px;
- top: 50%;
- }
- .form-horizontal .form-control {
- color: #7AB6B6;
- background-color: #fff;
- font-size: 17px;
- letter-spacing: 1px;
- height: 40px;
- padding: 5px 10px 2px 25px;
- box-shadow: 0 0 0 0 transparent;
- border: none;
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
- border-radius: 0;
- display: inline-block;
- }
- .form-control::placeholder {
- color: rgba(0, 0, 0, 0.2);
- font-size: 16px;
- }
- .form-horizontal .form-control:focus {
- border-bottom: 1px solid #7AB6B6;
- box-shadow: none;
- }
- .form-horizontal .btn {
- color: #7AB6B6;
- background-color: #EDF6F5;
- font-size: 18px;
- font-weight: 700;
- letter-spacing: 1px;
- border-radius: 5px;
- width: 50%;
- height: 45px;
- padding: 7px 30px;
- margin: 0 auto 25px;
- border: none;
- display: block;
- position: relative;
- transition: all 0.3s ease;
- }
- .form-horizontal .btn:focus,
- .form-horizontal .btn:hover {
- color: #fff;
- background-color: #7AB6B6;
- }
- .form-horizontal .btn:before,
- .form-horizontal .btn:after {
- content: '';
- background-color: #7AB6B6;
- height: 50%;
- width: 2px;
- position: absolute;
- left: 0;
- bottom: 0;
- z-index: 1;
- transition: all 0.3s;
- }
- .form-horizontal .btn:after {
- bottom: auto;
- top: 0;
- left: auto;
- right: 0;
- }
- .form-horizontal .btn:hover:before,
- .form-horizontal .btn:hover:after {
- height: 100%;
- width: 50%;
- opacity: 0;
- }
- .form-horizontal .create_account {
- color: #D6BC8B;
- font-size: 16px;
- font-weight: 600;
- display: inline-block;
- }
- .form-horizontal .create_account:hover {
- color: #7AB6B6;
- text-decoration: none;
- }
- </style>
- </head>
- <body>
- <div class="htmleaf-container">
- <header class="htmleaf-header" style="height: 200px;">
- <div class="htmleaf-links">
- </div>
- </header>
- <div class="demo form-bg">
- <div class="container">
- <div class="row">
- <div class="col-md-4"></div>
- <div class="col-md-4">
- <form class="form-horizontal">
- <div class="heading">Login form</div>
- <div class="form-group">
- <i class="fa fa-user"></i><input required name="login[username]" type="email"
- class="form-control" placeholder="Username"
- id="InputUsername">
- </div>
- <div class="form-group">
- <i class="fa fa-lock"></i><input required name="login[password]" type="password"
- class="form-control" placeholder="Password"
- id="InputPassword"/>
- </div>
- <div class="form-group">
- <button type="submit" class="btn btn-default" onClick="subLoginAction();return false;"><i
- class="fa fa-arrow-right"></i></button>
- <!--<span>Don't have an account? <a href="" class="create_account">Sign up</a></span>-->
- </div>
- </form>
- </div>
- <div class="col-md-4"></div>
- </div>
- </div>
- </div>
- </div>
- </body>
- <script type="text/javascript">
- function subLoginAction() {
- let username = $("#InputUsername").val();
- let password = $("#InputPassword").val();
- let post_data = {
- 'username': username,
- 'password': password
- };
- $.postJSON(
- http_ip_prot + 'user/login',
- JSON.stringify(post_data),
- function (data) {
- if (data['code'] == 0) {
- setCookie('access_token', data['res']['access_token'], data['res']['access_expire'])
- setCookie('refresh_token', data['res']['refresh_token'], data['res']['refresh_expire'])
- console.log(data)
- //window.location.href = "http://localhost:63339/web/index.html";
- window.location.href = "http://"+domain+":7724/web/index.html";
- } else {
- alert(data['msg'])
- }
- }
- );
- }
- </script>
- </html>
|