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