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

每次切换页面路由都会调用一次登录接口? #617

Closed
dufu1991 opened this issue Oct 16, 2023 · 4 comments
Closed

每次切换页面路由都会调用一次登录接口? #617

dufu1991 opened this issue Oct 16, 2023 · 4 comments
Assignees

Comments

@dufu1991
Copy link
Contributor

看这句代码的意思是每次切换页面都会调用登录接口?我实际项目开发中也确实是个逻辑,但是感觉不合理。还是我使用的方式不对?

await userStore.getUserInfo();

@github-actions
Copy link

👋 @dufu1991,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@github-actions
Copy link

♥️ 有劳 @timi137137 @liweijie0812 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @dufu1991

@timi137137
Copy link
Collaborator

这个是合理的,在实际开发中,登录态是会随时变化的。一但后端登录态出现变化前端没有变动则会出现错误访问之类的问题,每个项目的开发方式开发方法都不一样。因此这一点按自己所需修改便是

@dufu1991
Copy link
Contributor Author

是的,这个还是要看实际场景,我们的系统要求是登录状态放在每个接口控制,所以切换页面的时候是不需要判断的。明白了,我单独处理一下吧。感谢您的解答。

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

3 participants