Commit 2599f047 authored by TZW's avatar TZW

requestjs

parent 1da0fc3b
......@@ -24,7 +24,6 @@ const loginOut = async () => {
if (window.location.pathname !== '/user/login' && !redirect) {
localStorage.clear();
// history.replace(logoutRedirectUrl);
window.location.href = logoutRedirectUrl;
}
};
......@@ -106,15 +105,17 @@ const AvatarDropdown = ({ menu }) => {
[setInitialState],
);
const loadings = (
<span className={`${styles.action} ${styles.account}`}>
<Spin
size="small"
style={{
marginLeft: 8,
marginRight: 8,
}}
/>
</span>
<HeaderDropdown overlay={menuHeaderDropdown}>
<span className={`${styles.action} ${styles.account}`}>
<Spin
size="small"
style={{
marginLeft: 8,
marginRight: 8,
}}
/>
</span>
</HeaderDropdown>
);
if (!initialState) {
......
......@@ -32,9 +32,9 @@ const errorHandler = (error) => {
if (response && response.status) {
const errorText = codeMessage[response.status] || response.statusText;
const { status, url } = response;
if (status == '401' || status == '302') {
window.location.href = '/';
}
// if (status == '401' || status == '302') {
// window.location.href = '/';
// }
} else if (!response) {
notification.error({
description: '您的网络发生异常,无法连接服务器',
......
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