feat: 支持工作流对话匿名分享
- 增加免登录公共接口、访客隔离、限流和匿名上传校验 - 分离 SSE 连接与运行生命周期,支持刷新恢复服务端权威状态 - 持久化分享页对话并优化时间线滚动与输入区交互
This commit is contained in:
@@ -152,6 +152,12 @@ function setupAccessGuard(router: Router) {
|
||||
let devLoginPromise: null | Promise<void> = null;
|
||||
|
||||
router.beforeEach(async (to, from) => {
|
||||
// 公开路由必须在读取或刷新登录态之前短路,避免浏览器残留的过期
|
||||
// token 把匿名分享页重定向到登录页。
|
||||
if (to.meta.ignoreAccess) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const accessStore = useAccessStore();
|
||||
const userStore = useUserStore();
|
||||
const authStore = useAuthStore();
|
||||
@@ -227,11 +233,6 @@ function setupAccessGuard(router: Router) {
|
||||
|
||||
// accessToken 检查
|
||||
if (!accessStore.accessToken) {
|
||||
// 明确声明忽略权限访问权限,则可以访问
|
||||
if (to.meta.ignoreAccess) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// 没有访问权限,跳转登录页面
|
||||
if (to.fullPath !== LOGIN_PATH) {
|
||||
const cleanFullPath =
|
||||
|
||||
Reference in New Issue
Block a user