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,15 +105,17 @@ const AvatarDropdown = ({ menu }) => { ...@@ -106,15 +105,17 @@ const AvatarDropdown = ({ menu }) => {
[setInitialState], [setInitialState],
); );
const loadings = ( const loadings = (
<span className={`${styles.action} ${styles.account}`}> <HeaderDropdown overlay={menuHeaderDropdown}>
<Spin <span className={`${styles.action} ${styles.account}`}>
size="small" <Spin
style={{ size="small"
marginLeft: 8, style={{
marginRight: 8, marginLeft: 8,
}} marginRight: 8,
/> }}
</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