Преглед на файлове

Merge remote-tracking branch 'origin/qingban' into qingban

lupeng преди 11 месеца
родител
ревизия
b9e35df7ac
променени са 3 файла, в които са добавени 5 реда и са изтрити 6 реда
  1. 2 3
      src/layout/components/NavBar/components/NavbarRight.vue
  2. 2 2
      src/plugins/permission.ts
  3. 1 1
      src/store/modules/user.ts

+ 2 - 3
src/layout/components/NavBar/components/NavbarRight.vue

@@ -210,11 +210,10 @@ function logout() {
     userStore
       .logout()
       .then(() => {
+        router.replace(`/login`);
         tagsViewStore.delAllViews();
       })
-      .then(() => {
-        router.push(`/login?redirect=${route.fullPath}`);
-      });
+
   });
 }
 const clickTab = (targetName) => {

+ 2 - 2
src/plugins/permission.ts

@@ -63,8 +63,8 @@ export function setupPermission() {
     } else {
       // 未登录可以访问白名单页面
       if (whiteList.indexOf(to.path) !== -1) {
-        const dictStore = useDictionaryStore();
-        dictStore.checkDicts();
+        // const dictStore = useDictionaryStore();
+        // dictStore.checkDicts();
         next();
       } else {
         if (to.path === "/login") {

+ 1 - 1
src/store/modules/user.ts

@@ -68,7 +68,7 @@ export const useUserStore = defineStore("user", () => {
       logoutApi()
         .then(() => {
           localStorage.setItem("token", "");
-          location.reload(); // 清空路由
+          // location.reload(); // 清空路由
           resolve();
         })
         .catch((error) => {