vue,h5微信支付取消,返回上一页,陷入死循环()

 beforeRouteEnter(to, from, next) {
    next((vm) => {
      console.log(from, 'from')
      if (!from.name) {
        vm.backFlag = true
      }
    })
  },

从微信中间页跳过来的全是空,

back() {
      if (!this.backFlag) {
        this.$router.go(-1)
      } else {
        this.$router.push('/home/order')
      }
    },
————————
 beforeRouteEnter(to, from, next) {
    next((vm) => {
      console.log(from, 'from')
      if (!from.name) {
        vm.backFlag = true
      }
    })
  },

从微信中间页跳过来的全是空,

back() {
      if (!this.backFlag) {
        this.$router.go(-1)
      } else {
        this.$router.push('/home/order')
      }
    },