[Vuejs]-Why the url become like this(add ? before #) after redirecting and how can I redirect correctly

0👍

The part after ? is the query with key=redirect and value=full path

To redirect to the saved path call this after login

this.$router.push({ path: this.$route.query.redirectTo })

And you also need to prevent the default form behavior

<form v-on:submit.prevent ...

Leave a comment