Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
b26b4654
Commit
b26b4654
authored
Jan 19, 2017
by
季圣华
Browse files
登录后跳转到登录页面的bug修复
parent
47907cfb
Changes
1
Show whitespace changes
Inline
Side-by-side
WebRoot/pages/common/main.jsp
View file @
b26b4654
...
@@ -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>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment