Use Vue Router In Script

前端 未结 3 509
心在旅途
心在旅途 2021-01-29 10:17

I have a script that will redirect a user to the login screen when they get a response code of 401 - which means their session has expired within the API.

import         


        
3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-29 10:59

    You can try this:

    this.$router.push({ name: 'nome-of-location'})
    

提交回复
热议问题