Explorar o código

pref: config axios location href

wangyuan %!s(int64=2) %!d(string=hai) anos
pai
achega
7c5d4992e5
Modificáronse 1 ficheiros con 1 adicións e 4 borrados
  1. 1 4
      ittpc/src/request/axios.js

+ 1 - 4
ittpc/src/request/axios.js

@@ -1,6 +1,5 @@
 import axios from 'axios'
 import { Message, MessageBox } from 'element-ui';
-import Router from 'vue-router'
 const service = axios.create({
   timeout: 10000
 });
@@ -33,9 +32,7 @@ const service = axios.create({
           beforeClose: function (action, instance, done) {
             if (action == 'confirm') {
               sessionStorage.clear()
-              Router.replace({
-                path: '/login'
-              })
+              window.location.href = '/login'
             }
           }
         })