vue-router.esm.js?8c4f:2008 Uncaught (in promise) Error: Redirected when going from “/login?redirect
vue-router.esm.js?8c4f:2008 Uncaught (in promise) Error: Redirected when going from "/login?redirect=%2Fhome" to "/home" via a navigation guard.解决办法:router/index.jsconst originalPush = VueRouter.proto
·
vue-router.esm.js?8c4f:2008 Uncaught (in promise) Error: Redirected when going from "/login?redirect=%2Fhome" to "/home" via a navigation guard.
解决办法:
router/index.js
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)
}
更多推荐
已为社区贡献13条内容
所有评论(0)