fix(仪表板): 动态路径场景移动端分享链接无法访问

This commit is contained in:
fit2cloud-chenyw
2025-03-18 18:39:22 +08:00
committed by fit2cloud-chenyw
parent a13f2b0eee
commit aac865a1c2

View File

@@ -48,7 +48,12 @@ router.beforeEach(async (to, from, next) => {
linkQuery = '?' + tempQuery
}
}
window.location.href = window.origin + '/mobile.html#' + to.path + linkQuery
let pathname = window.location.pathname
pathname = pathname.replace('casbi/', '')
pathname = pathname.replace('oidc/', '')
pathname = pathname.substring(0, pathname.length - 1)
const prefix = window.origin + pathname
window.location.href = prefix + '/mobile.html#' + to.path + linkQuery
} else if (
wsCache.get('user.token') ||
isDesktop ||