refactor: 改用router.push并清除路由守卫缓存替代window.location.href

- 添加resetInstallCheck()清除安装状态缓存
- 安装完成后调用resetInstallCheck再router.push跳转
- 保持SPA无刷新体验
This commit is contained in:
2026-05-03 19:51:31 +08:00
parent fbc2e5ac91
commit a93bc7dfb7
2 changed files with 11 additions and 2 deletions
+5
View File
@@ -3,6 +3,11 @@ import type { Router } from 'vue-router'
let installChecked = false
let isInstalled = false
export function resetInstallCheck() {
installChecked = false
isInstalled = false
}
async function checkInstallStatus(): Promise<boolean> {
if (installChecked) return isInstalled
try {