Commit 64029eb2 authored by cellee's avatar cellee

Signed-off-by: cellee <893264950@qq.com>

parent 563ed16c
......@@ -86,15 +86,15 @@ export default {
changeOrigin: true,
pathRewrite: { '^': '' },
},
'/tos/': {
target: 'http://47.74.233.180:8651',
changeOrigin: true,
pathRewrite: { '^': '' },
},
// '/tos/': {
// target: 'http://192.168.1.28:8651',
// target: 'http://47.74.233.180:8651',
// changeOrigin: true,
// pathRewrite: { '^': '' },
// },
'/tos/': {
target: 'http://192.168.1.28:8651',
changeOrigin: true,
pathRewrite: { '^': '' },
},
},
};
......@@ -85,7 +85,7 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
// 用户重新打开需要重新登录
let time = localStorage.getItem('loginTime');
const tokenLogin = time ? JSON.parse(time) : '';
const tokenLogin = time ? JSON.parse(time) : false;
// 登录
if (history.location.pathname == '/') {
......@@ -124,6 +124,12 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
setTimeout(function () {
logOut();
}, 1000);
} else {
// 其他状态返回登录页 (没登陆)
const queryString = stringify({
redirect: window.location.href,
});
return <Redirect to={`/user/login?${queryString}`} />;
}
return children;
}
......
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