fix: 修复当token过期后,如果页面有多个请求会重复刷新token

This commit is contained in:
xiaoxian521
2022-11-01 16:06:22 +08:00
parent 4d91d2017c
commit 27bc135bd2
3 changed files with 50 additions and 20 deletions

View File

@@ -70,3 +70,8 @@ export function removeToken() {
Cookies.remove(TokenKey);
sessionStorage.removeItem(sessionKey);
}
/** 格式化tokenjwt格式 */
export const formatToken = (token: string): string => {
return "Bearer " + token;
};