yusheng há 4 meses atrás
pai
commit
4dc34f416b
1 ficheiros alterados com 4 adições e 4 exclusões
  1. 4 4
      src/utils/page-tab-util.js

+ 4 - 4
src/utils/page-tab-util.js

@@ -4,7 +4,7 @@
 import store from '@/store';
 import router from '@/router';
 import { Message } from 'element-ui';
-import { removeToken,removeCurrentUser } from '@/utils/token-util';
+import { removeToken, removeCurrentUser } from '@/utils/token-util';
 import { setDocumentTitle } from '@/utils/document-title-util';
 import {
   HOME_PATH,
@@ -242,11 +242,11 @@ export function logout(route, from) {
   removeCurrentUser();
   if (route) {
     router.push({
-      path: '/login',
-      query: from ? { from } : void 0
+      path: '/login'
+      // query: from ? { from } : void 0
     });
   } else {
     // 这样跳转避免再次登录重复注册动态路由
-    location.replace(BASE_URL + 'login' + (from ? '?from=' + from : ''));
+    location.replace(window.location.origin + '/login');
   }
 }