1
This commit is contained in:
@@ -53,9 +53,15 @@ export default {
|
||||
Page404
|
||||
})
|
||||
|
||||
// 跳转到首页(使用 location.href 触发完整页面加载)
|
||||
this.$Message.success('登录成功!')
|
||||
|
||||
// 跳转到首页
|
||||
// 使用 replace 避免返回时回到登录页
|
||||
setTimeout(() => {
|
||||
window.location.href = window.location.origin + window.location.pathname + '#/'
|
||||
this.$router.replace({ path: '/home' }).catch(() => {
|
||||
// 如果路由跳转失败,刷新页面
|
||||
window.location.href = window.location.origin + window.location.pathname + '#/'
|
||||
})
|
||||
}, 500)
|
||||
} catch (error) {
|
||||
console.error('登录失败:', error)
|
||||
|
||||
Reference in New Issue
Block a user