Commit d34b1819 by zhaochengxiang

session过期

parent 2ba5c1b4
......@@ -13,10 +13,6 @@ body {
background-color: #fff;
}
#root {
height: 100%;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
......
......@@ -89,12 +89,16 @@ export const SetSource = function (source) {
const callback = resp => {
if (resp.status === 401) {
message.warning("session过期,请重新登录!");
window.setTimeout(args => Open(`${ContextPath}/login`, { target: '_self' }), 2000);
if (window.parent) {
window.parent.postMessage('session invalid');
}
return null;
}
else if (resp.status !== 200) {
throw resp.data
}
return resp.data || resp;
}
......
Markdown is supported
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