Browse Source

更新弹窗

黄琪勇 1 năm trước cách đây
mục cha
commit
e0e12d321a
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 0
      src/router/index.ts
  2. 0 2
      src/store/modules/user.ts

+ 2 - 0
src/router/index.ts

@@ -5,6 +5,7 @@ import { ElMessage } from "element-plus"
 import { getToken, CODE401 } from "@/libs/auth"
 import { generateAsyncMenusAsyncRoutes } from "@/libs/utils"
 import userStore from "@/store/modules/user"
+import { closeAllModalFrame } from "@/plugin/modalFrame"
 
 const userStoreHook = userStore()
 const router = createRouter({
@@ -65,6 +66,7 @@ router.beforeEach((to, from, next) => {
    }
 })
 router.afterEach(() => {
+   closeAllModalFrame()
    NProgress.done()
 })
 

+ 0 - 2
src/store/modules/user.ts

@@ -6,7 +6,6 @@ import { removeToken, setToken, setUserType, getUserType, removeUserType, setCOD
 import router, { resetRouter } from "@/router"
 import { httpAjax, httpAjaxLoading } from "@/plugin/httpAjax"
 import { menus_gym, menus_gyt } from "@/config/menus"
-import { closeAllModalFrame } from "@/plugin/modalFrame"
 
 interface userDataType {
    appKey: string
@@ -74,7 +73,6 @@ const useStore = defineStore("user", {
       resetUser() {
          this.userInfo = {}
          this.roles = undefined
-         closeAllModalFrame()
          removeToken()
          removeUserType()
          resetRouter()