登录后跳转到登录页面的bug修复
This commit is contained in:
parent
47907cfb16
commit
b26b4654af
@ -105,25 +105,14 @@
|
|||||||
//加载桌面
|
//加载桌面
|
||||||
HROS.base.init();
|
HROS.base.init();
|
||||||
}
|
}
|
||||||
function JSGetCookie(Name) {
|
//判断是否存在session,如果不存在就跳到登录界面
|
||||||
var search = Name + "="
|
function UserOut() {
|
||||||
if (document.cookie.length > 0) {
|
var kid = ${sessionScope.user.id};
|
||||||
offset = document.cookie.indexOf(search)
|
if (!kid){
|
||||||
if (offset != -1) {
|
top.location.href = '../../';
|
||||||
offset += search.length
|
|
||||||
end = document.cookie.indexOf(";", offset)
|
|
||||||
if (end == -1) end = document.cookie.length
|
|
||||||
return unescape(document.cookie.substring(offset, end))
|
|
||||||
}
|
|
||||||
else return ""
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function UserOut() {
|
setInterval(UserOut, 5000); //每5秒检测一次
|
||||||
if (JSGetCookie("UserId") == null)
|
|
||||||
top.location.href = '../../';
|
|
||||||
}
|
|
||||||
setInterval(UserOut, 5000);
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user