How to use axios in vue to make the reason jump according to code after the request ends (implemented in the encapsulated axios)?

I encapsulated axios and introduced

axios.js code-4 ,this.$router.push (this);
"", if if?

into main.js.
Mar.01,2021

Project entry exports the root instance

let rootVm = new Vue({xxxxx})
export default rootVm

Import into the configuration of ajax

import rootVm from '../index.js'

then you can

rootVm.$router.push(xx)
Menu