Commit b26b4654 authored by 季圣华's avatar 季圣华
Browse files

登录后跳转到登录页面的bug修复

parent 47907cfb
...@@ -105,25 +105,14 @@ ...@@ -105,25 +105,14 @@
//加载桌面 //加载桌面
HROS.base.init(); HROS.base.init();
} }
function JSGetCookie(Name) { //判断是否存在session,如果不存在就跳到登录界面
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 ""
}
}
function UserOut() { function UserOut() {
if (JSGetCookie("UserId") == null) var kid = ${sessionScope.user.id};
if (!kid){
top.location.href = '../../'; top.location.href = '../../';
} }
setInterval(UserOut, 5000); }
setInterval(UserOut, 5000); //每5秒检测一次
}); });
</script> </script>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment