路由拦截器的路径和登录成功后路由重定向发生冲突导致
在路由跳转的时候把错误抛出
this.$router.push({}).catch(()=>{})
main.js
const originalPush = Router.prototype.push
Router.prototype.push = function push(location, onResolve, onReject) {if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)return originalPush.call(this, location).catch(err => err)
}