Try fixing router v2
This commit is contained in:
parent
7810af56ef
commit
15121000e8
2 changed files with 7 additions and 7 deletions
|
@ -14,11 +14,4 @@
|
|||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
<script>
|
||||
const redirect = sessionStorage.redirect;
|
||||
delete sessionStorage.redirect;
|
||||
if (redirect && redirect != location.href) {
|
||||
history.replaceState(null, null, redirect);
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
|
|
|
@ -30,4 +30,11 @@ Vue.config.productionTip = false;
|
|||
new Vue({
|
||||
router,
|
||||
render: h => h(App),
|
||||
created() {
|
||||
if (sessionStorage.redirect) {
|
||||
const { redirect } = sessionStorage;
|
||||
delete sessionStorage.redirect;
|
||||
this.$router.push(redirect);
|
||||
}
|
||||
},
|
||||
}).$mount('#app');
|
||||
|
|
Loading…
Reference in a new issue