guhongwei 4 年之前
父節點
當前提交
1abe5efd24
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/router/index.js

+ 4 - 0
src/router/index.js

@@ -1,6 +1,10 @@
 import Vue from 'vue';
 import VueRouter from 'vue-router';
 import store from '@/store/index';
+const originalPush = VueRouter.prototype.push;
+VueRouter.prototype.push = function push(location) {
+  return originalPush.call(this, location).catch(err => err);
+};
 const jwt = require('jsonwebtoken');
 const list = [
   {