mirror of https://github.com/fantasticit/think.git
client: add 429 handler
This commit is contained in:
parent
add3f93ebe
commit
fbfc00ddd1
|
@ -61,7 +61,9 @@ HttpClient.interceptors.response.use(
|
||||||
Router.replace(`/login?redirect=${window.location.pathname}`);
|
Router.replace(`/login?redirect=${window.location.pathname}`);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 429:
|
||||||
|
Toast.error('请求过于频繁,请稍候再试!');
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
isBrowser && Toast.error((err.response && err.response.data && err.response.data.message) || '未知错误!');
|
isBrowser && Toast.error((err.response && err.response.data && err.response.data.message) || '未知错误!');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue