注册一个全局前置路由守卫后,this.$router.push(会报错Uncaught (in promise) 解决办法:在router/index.js文件下 /*设置路由守卫后,this.$router.push(会报错Uncaught (in promise)*/ const originalPush = VueRouter.prototype.push; VueRouter.prototype.push = function push(location) { return originalPush.call(this, location).catch(err => err) };