guhongwei 4 gadi atpakaļ
vecāks
revīzija
1abe5efd24
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  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 = [
   {