61 lines
2.2 KiB
HTML
61 lines
2.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh" style="width:100%; height:100%; background: #fff url('/static/handle/img/login-bg.jpg') repeat left top; overflow:hidden;">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>用户登录</title>
|
|
<script type="text/javascript" src="/static/handle/js/jquery-1.8.3.min.js"></script>
|
|
<style type="text/css">
|
|
*{margin:0; padding:0; border:0; font-family:"微软雅黑"}
|
|
.login{width:425px; height:500px; background:#fff; position: absolute; top:100px; left:45%;}
|
|
.login h2{padding-top:50px; text-align:center;}
|
|
.login h3{font-size:15px; color:#666; padding:20px 0px 0px 60px; font-weight:normal;}
|
|
.login .input{padding:4px; border:1px solid #ddd; width:290px; border-radius:5px; margin:10px 0px 0px 60px; height:32px; line-height:32px;}
|
|
.login .code{height:43px; margin:10px 0px 0px 60px;}
|
|
.login .code .input-code{padding:4px; border:1px solid #ddd; height:32px; line-height:32px; width:180px; border-radius:5px; display:block; float:left; margin-right:10px;}
|
|
.login button{display:block; margin:30px auto; width:290px; height:42px; border-radius:5px; background:#7FCF0A; cursor:pointer; color:#fff;}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="login">
|
|
<h2>操作台登录</h2>
|
|
<h3>账号</h3>
|
|
<input class="input" type="text" name="account" id="account" value="" maxlength="50" />
|
|
<h3>密码</h3>
|
|
<input class="input" type="password" name="pass" id="pass" value="" maxlength="50" />
|
|
<button id="dologin" style="font-size:15px;">登录</button>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(function (){
|
|
$('#dologin').click(function (){
|
|
var query = new Object();
|
|
if($('#account').val() != ''){
|
|
query.account = $('#account').val();
|
|
}else{
|
|
alert('请输入账号');
|
|
return false;
|
|
}
|
|
if($('#pass').val() != '' && $('#pass').val().length > 5){
|
|
query.password = $('#pass').val();
|
|
}else{
|
|
alert('请正确填写密码');
|
|
return false;
|
|
}
|
|
$.ajax({
|
|
url:'/login/dologin',
|
|
data:query,
|
|
dataType:"json",
|
|
type:"POST",
|
|
success:function(data){
|
|
if(data.code === 1){
|
|
window.location.href=data.url;
|
|
}else{
|
|
alert(data.msg);
|
|
$('#passcode').attr('src',$('#passcode').attr('src')+'?');
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
</script>
|
|
</body>
|
|
</html> |