报错:如图所示
翻译一下就是:避免多余的导航到当前位置:"/product/northperson? "id = 2 f62c3bcf77771796779db5d388e8f2a”
原因:跳转路由的时候用的 $router.push(),并且跳转的都是同一个路由地址,只是传参的id不一样,
解决方法:
//获取原型对象上的push函数
const originalPush = router.prototype.push
//修改原型对象中的push方法
router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}