fix: 安装完成后用window.location.href跳转登录页
使用router.push可能被路由守卫拦截或缓存影响, 改用window.location.href强制刷新页面,确保路由守卫 重新检查安装状态并正确加载登录页。
This commit is contained in:
@@ -42,7 +42,7 @@ async function checkInstallStatus() {
|
|||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
installStatus.value = data?.data
|
installStatus.value = data?.data
|
||||||
if (data?.data?.installed) {
|
if (data?.data?.installed) {
|
||||||
router.push('/login')
|
window.location.href = '/login'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
@@ -162,7 +162,7 @@ function goNext() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function goLogin() {
|
function goLogin() {
|
||||||
router.push('/login')
|
window.location.href = '/login'
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user