mirror of
https://github.com/dqjdda/Aurora.git
synced 2018-11-06 05:33:29 +00:00
修复Session过期后,登录页面内嵌在Iframe中的bug
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
<!-- endbuild -->
|
||||
</head>
|
||||
<body class="layui-layout-body kit-theme-default">
|
||||
<input hidden="hidden" value="parent" id="isParent">
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
<!-- header -->
|
||||
<div class="layui-header">
|
||||
@@ -142,9 +143,7 @@
|
||||
layui.config({
|
||||
base: 'js/'
|
||||
}).use('index');
|
||||
|
||||
</script>
|
||||
<!-- endbuild -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -8,7 +8,6 @@
|
||||
<link rel="stylesheet" th:href="@{'/plugins/css/layui.css'}" th:id="layui">
|
||||
<link rel="stylesheet" th:href="@{'/plugins/css/login.css'}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="kit-login">
|
||||
<div class="kit-login-bg"></div>
|
||||
@@ -54,6 +53,10 @@
|
||||
<script th:src="@{'/js/MD5.js'}"></script>
|
||||
<script th:src="@{'/plugins/layui.js'}"></script>
|
||||
<script>
|
||||
//session过期后跳出框架,返回到登录页面
|
||||
if($("#isParent", window.parent.document).val() != undefined){
|
||||
window.parent.location.href='/login.html';
|
||||
}
|
||||
layui.use(['jquery', 'layer','form'], function () {
|
||||
var layer = layui.layer, form = layui.form;
|
||||
//回车事件绑定
|
||||
@@ -63,13 +66,11 @@
|
||||
login();
|
||||
}
|
||||
};
|
||||
|
||||
form.on('submit(login_hash)', function(data) {
|
||||
login();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
function login() {
|
||||
var username = $("#username").val();
|
||||
var password = MD5($("#password").val());
|
||||
|
||||
Reference in New Issue
Block a user