From c04bbbbe82d0f1ee4bd01ba2ca9f2b3c0b71425e Mon Sep 17 00:00:00 2001 From: whychdw <49690745@qq.com> Date: 星期三, 26 五月 2021 10:22:37 +0800 Subject: [PATCH] 提交内容 --- src/router/index.js | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index cb0b706..f8fa021 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -8,6 +8,14 @@ routes }); +//瑙e喅vue璺敱閲嶅瀵艰埅閿欒 +//鑾峰彇鍘熷瀷瀵硅薄涓婄殑push鍑芥暟 +const originalPush = VueRouter.prototype.push +//淇敼鍘熷瀷瀵硅薄涓殑push鏂规硶 +VueRouter.prototype.push = function push(location) { + return originalPush.call(this, location).catch(err => err) +} + /* eslint-disable */ router.beforeEach((to, from, next) => { if (to.name != 'login' && (!sessionStorage.getItem('uid') || sessionStorage.getItem('uid') == -1)) { -- Gitblit v1.9.1