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>
|
<div id="app"></div>
|
||||||
<!-- built files will be auto injected -->
|
<!-- built files will be auto injected -->
|
||||||
</body>
|
</body>
|
||||||
<script>
|
|
||||||
const redirect = sessionStorage.redirect;
|
|
||||||
delete sessionStorage.redirect;
|
|
||||||
if (redirect && redirect != location.href) {
|
|
||||||
history.replaceState(null, null, redirect);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -30,4 +30,11 @@ Vue.config.productionTip = false;
|
||||||
new Vue({
|
new Vue({
|
||||||
router,
|
router,
|
||||||
render: h => h(App),
|
render: h => h(App),
|
||||||
|
created() {
|
||||||
|
if (sessionStorage.redirect) {
|
||||||
|
const { redirect } = sessionStorage;
|
||||||
|
delete sessionStorage.redirect;
|
||||||
|
this.$router.push(redirect);
|
||||||
|
}
|
||||||
|
},
|
||||||
}).$mount('#app');
|
}).$mount('#app');
|
||||||
|
|
Loading…
Reference in a new issue