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.
86 lines
2.7 KiB
86 lines
2.7 KiB
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
<title>登录</title>
|
|
<!-- 样 式 文 件 -->
|
|
<link rel="stylesheet" href="component/pear/css/pear.css" />
|
|
<link rel="stylesheet" href="admin/css/other/plogin.css" />
|
|
</head>
|
|
<!-- 代 码 结 构 -->
|
|
|
|
<body background="admin/images/background.svg" style="background-size: cover;">
|
|
<form class="layui-form" action="javascript:void(0);">
|
|
<div class="layui-form-item">
|
|
<img class="logo" src="admin/images/logo.png" />
|
|
<div class="title">登 录</div>
|
|
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<input name="loginName" placeholder="用户名" lay-verify="required" hover class="layui-input" />
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<input name="password" type="password" autocomplete="off" placeholder="密码" lay-verify="required" hover
|
|
class="layui-input" />
|
|
</div>
|
|
<!-- <div class="layui-form-item">
|
|
<input placeholder="验证码 : " value="vbjfq" hover lay-verify="required"
|
|
class="code layui-input layui-input-inline" />
|
|
<img src="admin/images/captcha.gif" class="codeImage" />
|
|
</div> -->
|
|
<div class="layui-form-item">
|
|
<button type="button" class="pear-btn pear-btn-success login" lay-submit lay-filter="login">
|
|
登 入
|
|
</button>
|
|
</div>
|
|
</form>
|
|
<!-- 资 源 引 入 -->
|
|
<script src="component/layui/layui.js"></script>
|
|
<script src="component/pear/pear.js"></script>
|
|
<script src="component/pear/jsencrypt.min.js"></script>
|
|
<script>
|
|
layui.use(['form', 'button', 'popup'], function () {
|
|
var form = layui.form;
|
|
var button = layui.button;
|
|
var popup = layui.popup;
|
|
var $ = layui.jquery;
|
|
|
|
// 登 录 提 交
|
|
form.on('submit(login)', function (data) {
|
|
|
|
var publicKey = "-----BEGIN PUBLIC KEY-----\MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCcd+0zTY9Gn94iqkQJTlxYnEnCeFsLkk0a7hoAvi2B74VzDVV3xH0ZO9RkXvo1SgCB+uzbEWdrgQkzTqyjfTtgOguu3OnkVxIMJF34ibchTY0LWHGxq1m2gLGuVVqrlu1LtdV0X7xo/5zc8Mr+46veWb86kSpqe6rOAm69WWo5GwIDAQAB\-----END PUBLIC KEY-----";
|
|
var encrypt = new JSEncrypt();
|
|
encrypt.setPublicKey(publicKey);
|
|
|
|
$.ajax({
|
|
type: "POST",
|
|
dataType: "json",
|
|
async: false,
|
|
url: "/dsBase/collect/doFillLogin",
|
|
data: {
|
|
"username": data.field.loginName,
|
|
"password": encrypt.encrypt(data.field.password)
|
|
},
|
|
success: function (result) {
|
|
if (result.success) {
|
|
button.load({
|
|
elem: '.login',
|
|
time: 800,
|
|
done: function () {
|
|
location.href = "pindex.html";
|
|
}
|
|
});
|
|
} else {
|
|
alert(result.msg);
|
|
}
|
|
}
|
|
});
|
|
return false;
|
|
});
|
|
})
|
|
</script>
|
|
</body>
|
|
|
|
</html> |