You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

178 lines
5.8 KiB

<!doctype html>
<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">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<title>登录</title>
<!-- Bootstrap core CSS -->
<link href="./css/bootstrap.min.css" rel="stylesheet">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="./css/ie10-viewport-bug-workaround.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="./css/signin.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="./js/html5shiv.min.js"></script>
<script src="./js/respond.min.js"></script>
<![endif]-->
<style>
h2{text-align: center;}
body{
background: url(./images/agty8-ippg2.webp);
background-position: center top;
}
form{
background: url(./images/box.png);
background-size: 100% 100%;
_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="./box.png")!important;
*filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=scale,src="./images/box.png")!important;
-webkit-filter: opacity(1)!important;
}
.form-signin-heading{
margin-top: 10%;
}
.form-signin{
max-width: 450px;
padding: 55px 65px;
margin-top: 30px;
}
.form-signin-heading{
/*font-size: 42px;*/
color: #FFFFFF;
}
input.form-control{
color: #5cefff;
background: rgba(16,36,63,0.42);
border: none;
}
.btn-primary {
color: #fff;
background-color: #00a7b9;
border-color: #5cefff;
}
.btn-primary:hover, .btn-primary:active, .btn-primary:focus{
background-color: #00a7b9;
border-color: #5cefff;
opacity: 0.85;
}
#username{
padding-left: 40px;
background: rgba(16,36,63,0.42) url(./images/usr.svg);
background-repeat: no-repeat;
background-size: auto 40% ;
background-position: 10px center;
margin-top: 5px;
border-radius: 4px;
}
#password{
padding-left: 40px;
background: rgba(16,36,63,0.42) url(./images/pw.svg);
background-repeat: no-repeat;
background-size: auto 40% ;
background-position: 10px center;
margin-top: 20px;
margin-bottom: 20px;
border-radius: 4px;
}
input::-webkit-input-placeholder{
color:#00a7b9 !important;
/*opacity: 0.75;*/
}
input::-moz-placeholder{ /* Mozilla Firefox 19+ */
color:red;
}
input:-moz-placeholder{ /* Mozilla Firefox 4 to 18 */
color:red;
}
input:-ms-input-placeholder{ /* Internet Explorer 10-11 */
color:red;
}
.popover{
opacity: 0.5!important;;
}
.alert{
padding: 10px;
color: #f5f5f5ad;
background-color: #12e2e04d;
opacity: 1;
}
</style>
</head>
<body>
<div class="container">
<h2 class="form-signin-heading">唐山开平大数据中心</h2>
<form class="form-signin">
<div class="alert alert-dismissible fade in " role="alert" style="display: none;" >
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true" style="margin-right: 10px;"></span> <span class="info">用户名或密码不正确</span>
</div>
<label for="username" class="sr-only">用户名</label>
<input type="text" id="username" class="form-control" placeholder="用户名" required autofocus autocomplete="off">
<label for="password" class="sr-only">密码</label>
<input type="password" id="password" class="form-control" placeholder="密码" required>
<div class="checkbox" style="display: none;">
<label>
<input type="checkbox" value="remember-me"> 记住密码
</label>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit" onclick="login();return false;">登录</button>
</form>
</div> <!-- /container -->
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="./js/ie10-viewport-bug-workaround.js"></script>
<script src="./js/jquery.js"></script>
<script>
function login(){
var usr = $('#username').val();
var pw = $('#password').val();
if(usr === ''){
$('.alert .info').text('用户名是必填项!');
$('.alert').show();
return false;
}else if(pw === ''){
$('.alert .info').text('密码是必填项!');
$('.alert').show();
return false;
}
$.ajax({
url: "http://10.10.14.186:8015/support/account/login",
type: "post",
//contentType: "application/json",
//dataType: "json",
xhrFields:{
withCredentials: true,
},
crossDomain: true,
data: JSON.stringify({username: usr, password: pw, type: "account"}),
/*headers:{
'Content-Type': 'application/json'
},*/
success: function(result){
if(result.status === 'ok'){
localStorage.setItem("islogin",1)
location.href = './';
}
if(result.status === 'error'){
$('.alert .info').text('错误的用户名和密码!');
$('.alert').show();
return false;
}
}
});
}
</script>
</body>
</html>