diff --git a/src/views/login.vue b/src/views/login.vue index c86ed67..93f1499 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -142,7 +142,10 @@ export default { Cookies.remove('rememberMe') } this.$store.dispatch("Login", this.loginForm).then(() => { - this.$router.push({ path: this.redirect || "/sloworder/index" }).catch(()=>{}) + // 添加小延迟确保路由准备好 + setTimeout(() => { + this.$router.push({ path: this.redirect || "/sloworder/index" }).catch(()=>{}) + }, 100) }).catch(() => { this.loading = false if (this.captchaEnabled) {