fix: 绑定页用 window.location 跳转登录 (企微浏览器兼容)

router.push 在企微内置浏览器可能不触发跳转,
改用 window.location.href 强制整页跳转

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-06-26 15:09:31 +08:00
parent 19ebb85209
commit 9d3a8ae57e
+2 -2
View File
@@ -21,8 +21,8 @@ onMounted(() => {
return
}
if (!auth.isLoggedIn) {
// Not logged in yet — redirect to login, then come back here
router.push(`/login?redirect=${encodeURIComponent(route.fullPath)}`)
// Not logged in yet — redirect to login (use window.location for WeChat Work browser compat)
window.location.href = `/login?redirect=${encodeURIComponent(route.fullPath)}`
return
}
})