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

你好。我这有个问题就是登录之后点击导航跳转到页面 都是空白页这是什么问题 #5

Open
yangjiashengYJS opened this issue Jan 6, 2023 · 5 comments

Comments

@yangjiashengYJS
Copy link

如题

@fellow-me
Copy link
Owner

@yangjiashengYJS 这是路由的问题,登录之后,系统根据当前用户的角色生成路由,这中间有一段延迟时间。因为路由还未完全生成,所以点击导航栏之后会出现空白,我调整了几次延迟时间,但还是会出现这个问题,目前解决方法是多刷新几次,代码在/router/index.js中。

@yangjiashengYJS
Copy link
Author

但是我访问本地服务器的时候就没有问题 , 如果是后台连接远程数据库 点击跳转页面就是空白页

@yangjiashengYJS
Copy link
Author

@fellow-me 还有一个问题是我登录过期了,刷新页面就是会空白 不会跳转到登录页

@fellow-me
Copy link
Owner

@yangjiashengYJS 在/utils/request.js中,我只设置了当员工状态异常,才强制退出登录。之前设想的是当token过期时,显示404页面,但一直没成功。
在JWTInterceptor.java中,当员工状态异常,就抛出一个异常,并向前端发送一个响应。前端响应拦截器(/utils/request.js中)通过获取响应数据中的响应码,判断发生的异常,决定是否强制退出。
你可以根据自己的需求,决定什么时候强制退出

@fellow-me
Copy link
Owner

@yangjiashengYJS 问题已经解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants