<!DOCTYPE html>
|
<html>
|
|
<head>
|
<meta charset="utf-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<title>福利发放</title>
|
<script>
|
window.onresize = function() {
|
document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
|
};
|
window.onresize();
|
</script>
|
<link rel="stylesheet" type="text/css" href="../layui/css/layui.css" />
|
<link rel="stylesheet" type="text/css" href="css/common.css" />
|
<script src="../js/jquery.min.js"></script>
|
<script src="../layui/layui.js"></script>
|
<script src="js/http.js"></script>
|
|
<style>
|
.icon {
|
width: 2.5rem;
|
height: auto;
|
margin-top: 1rem;
|
}
|
|
.title {
|
font-family: Microsoft YaHei;
|
font-weight: 400;
|
font-size: 0.48rem;
|
color: #3279F3;
|
margin-top: 0.2rem;
|
}
|
|
.container {
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
}
|
|
.btn {
|
width: 5.97rem;
|
height: 0.9rem;
|
border-radius: 0.45rem;
|
font-size: 0.34rem;
|
color: #FFFFFF;
|
margin-top: 0.87rem;
|
}
|
|
.login_content {
|
background-color: #F3F3F3;
|
height: 0.9rem;
|
border-radius: 0.45rem;
|
width: 5.97rem;
|
margin-top: 0.23rem;
|
line-height: 0.9rem;
|
padding-left: 0.42rem;
|
}
|
|
.login_content img {
|
width: 0.37rem;
|
margin-right: 0.2rem;
|
}
|
|
.login_content input {
|
border: none;
|
background-color: transparent;
|
font-size: 0.34rem;
|
height: 0.9rem;
|
line-height: 0.9rem;
|
color: #000000;
|
}
|
</style>
|
</head>
|
|
<body>
|
|
<div class="container">
|
<img class="icon" src="img/logo.png" />
|
|
<div class="title">登录你的账户</div>
|
|
<div style="height: 0.8rem;"></div>
|
|
<div class="login_content">
|
<img src="img/icon_account.png" />
|
<input type="text" id="account" placeholder="请输入账号" />
|
</div>
|
|
<div class="login_content">
|
<img src="img/icon_pwd.png" style="width: 0.31rem;" />
|
<input type="password" id="pwd" placeholder="请输入密码" />
|
</div>
|
|
<button class="btn-active btn">登 录</button>
|
|
</div>
|
|
<script>
|
$(function() {
|
$(".btn").click(function() {
|
var account = $("#account").val();
|
var pwd = $("#pwd").val();
|
if (account.length <= 0) {
|
layer.msg("请输入账号");
|
return;
|
}
|
if (pwd.length <= 0) {
|
layer.msg("请输入密码");
|
return;
|
}
|
var index = layer.load();
|
http_util.post("/agentapi/admin/login", {
|
account: account,
|
pwd: pwd
|
}, function(res) {
|
layer.close(index);
|
if (res.code == 0) {
|
layer.msg("登录成功");
|
let redirect = http_util.getQueryString("redirect");
|
if (redirect != null && redirect.length > 0) {
|
window.location.replace(redirect);
|
} else {
|
window.location.replace("index.html");
|
}
|
} else {
|
layer.msg(res.msg);
|
}
|
}, function(res) {
|
layer.close(index);
|
layer.msg(res);
|
});
|
});
|
});
|
</script>
|
|
</body>
|
|
</html>
|