Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

token失效后第一次打开一直停留在加载页 #512

Closed
bangxingni opened this issue Apr 21, 2021 · 2 comments
Closed

token失效后第一次打开一直停留在加载页 #512

bangxingni opened this issue Apr 21, 2021 · 2 comments

Comments

@bangxingni
Copy link

image 这一段应该也包裹在try catch 代码块中,否则当请求状态码返回401 token失效时, 第一次进入会执行不下去,只有url返回了login,动画停留在加载页,
image

@Kchengz
Copy link

Kchengz commented Apr 24, 2021

有遇到相同的问题

@anncwb anncwb closed this as completed in 6a88205 Apr 24, 2021
@zuihou
Copy link

zuihou commented Apr 26, 2021

目测将上面的代码放到try catch 代码块中还是不能自动跳转到login页面,

我在checkStatus.ts 中加入 router.replace({ path: PageEnum.BASE_LOGIN }); 才能跳到login, 但有时候不灵..

case 401:
      error(msg || t('sys.api.errMsg401'));
      router.replace({ path: PageEnum.BASE_LOGIN });

@github-actions github-actions bot locked and limited conversation to collaborators Sep 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants