<template>
  <div></div>
</template>
<script>
export default {
  beforeRouteEnter(to, from, next) {
    console.log(from);
    next(vm => {
      vm.$router.replace(from.fullPath)
      // 跳到该路由页面后，再替换为from.path来源路径
    })
  }
}
</script>