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

feat: 支持多标签页打开已经登录的系统后无需再登录并添加7天内免登录功能 #747

Merged
merged 2 commits into from
Oct 7, 2023

Conversation

xiaoxian521
Copy link
Member

@xiaoxian521 xiaoxian521 commented Oct 6, 2023

改动点描述:

1. 将存储在sessionStorage的全部信息存储到localStorage,平台默认不在sessionStorage存储信息,主要为了支持多标签页打开已经登录的系统后无需再登录功能,因为sessionStorage在多标签是不共享数据的,虽然有办法解决这个问题,但都不完美,尤其是在一个标签页修改了sessionStorage里的信息后,为了别的标签页sessionStorage信息保持一致,不得不去通知它,多了很多额外的代码,处理是比较麻烦的,所以这里建议大家如果有多标签共享信息的需求,就不要将信息存储到sessionStorage

下面两个问题也就迎刃而解了
#682
#662

2. 添加7天内免登录功能。通过判断是否勾选登录页的7天内免登录选项,对存在cookiemultiple-tabs设置过期时间。未勾选,过期时间默认为浏览器全部关闭销毁multiple-tabs,已勾选,multiple-tabs会在cookie中存储7天,浏览器全部关闭也不会销毁,除非手动清除

演示视频

Kapture.2023-10-07.at.10.40.42.mp4

@xiaoxian521 xiaoxian521 added PR::WIP 正在开发中 test:waiting 等待测试 test:add report 需要添加测试报告 labels Oct 6, 2023
@xiaoxian521 xiaoxian521 changed the title feat: 支持多标签页打开已经登录的系统后无需再登录 feat: 支持多标签页打开已经登录的系统后无需再登录并添加7天内免登录功能 Oct 6, 2023
@xiaoxian521 xiaoxian521 added test:pass 测试通过 and removed PR::WIP 正在开发中 test:waiting 等待测试 test:add report 需要添加测试报告 labels Oct 6, 2023
@xiaoxian521 xiaoxian521 merged commit 7e7b6fe into main Oct 7, 2023
1 check passed
@xiaoxian521 xiaoxian521 deleted the refactor/del-session branch October 7, 2023 07:02
@xiaoxian521 xiaoxian521 added the v5.0.0 5.0.0版本 label Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test:pass 测试通过 v5.0.0 5.0.0版本
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant