<!--
 * @Author: 文贝
 * @Date: 2022-04-16 16:42:31
 * @LastEditors: 文贝
 * @LastEditTime: 2022-04-16 16:42:41
 * @Description:
 * @FilePath: \templates\vue-hash-template\src\views\redirect\index.vue
-->
<script>
export default {
  beforeCreate() {
    const { params, query } = this.$route
    const { path } = params
    this.$router.replace({ path: '/' + path, query }).catch(err => {
      console.log(err)
    })
  },
  render: function (h) {
    return h() // avoid warning message
  }
}
</script>
