client: add 429 handler

This commit is contained in:
fantasticit 2022-05-26 13:35:21 +08:00
parent add3f93ebe
commit fbfc00ddd1
1 changed files with 3 additions and 1 deletions

View File

@ -61,7 +61,9 @@ HttpClient.interceptors.response.use(
Router.replace(`/login?redirect=${window.location.pathname}`);
}
break;
case 429:
Toast.error('请求过于频繁,请稍候再试!');
break;
default:
isBrowser && Toast.error((err.response && err.response.data && err.response.data.message) || '未知错误!');
}