This commit is contained in:
雷欧(林平凡)
2025-09-19 19:09:09 +08:00
parent a14b64c14b
commit 8e32bd2463

View File

@@ -142,10 +142,10 @@ export default {
Cookies.remove('rememberMe') Cookies.remove('rememberMe')
} }
this.$store.dispatch("Login", this.loginForm).then(() => { this.$store.dispatch("Login", this.loginForm).then(() => {
// 添加小延迟确保路由准备好 // 使用 replace 而不是 push避免路由历史问题
setTimeout(() => { this.$nextTick(() => {
this.$router.push({ path: this.redirect || "/sloworder/index" }).catch(()=>{}) window.location.href = this.redirect || "/sloworder/index"
}, 500) })
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
if (this.captchaEnabled) { if (this.captchaEnabled) {