Commit 2599f047 authored by TZW's avatar TZW

requestjs

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