设置完登录拦截报下面的错
我在login.vue组件中使用的是this.$router.replace跳转的,换成push跳转也没用
这种方法也不行
const originalPush = VueRouter.prototype.push
VueRouter.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)
}
请问除了降低router版本还有什么方法呀?