perf(X-Pack): 移动端打开预览链接跳转到正确的资源页面

This commit is contained in:
fit2cloud-chenyw
2025-11-18 12:48:00 +08:00
committed by fit2cloud-chenyw
parent 17b4e03a38
commit c0315a296e

View File

@@ -66,6 +66,9 @@ router.beforeEach(async (to, from, next) => {
let pathname = window.location.pathname
pathname = pathname.substring(0, pathname.length - 1)
let url = window.origin + pathname + '/mobile.html#/index'
if (location.hash?.startsWith('#/preview')) {
url = window.origin + pathname + '/mobile.html' + location.hash
}
if (window.location.search) {
url += window.location.search
}