今天打开项目点击底部首页导航突然报错
从别的页面进入然后点击底部首页导航就不会报错;
去router的index.js页面(引入vue-router的页面)添加如下代码可以完美解决
const originalPush = Router.prototype.push;
Router.prototype.push = function push (location) {
return originalPush.call(this, location).catch(err => err);
};