diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue index deed2bce2..35cc24d12 100644 --- a/src/views/login/components/LoginForm.vue +++ b/src/views/login/components/LoginForm.vue @@ -297,6 +297,9 @@ getCode() return } + const { wsCache } = useCache() + // 登陆成功先清空遗留的缓存 + wsCache.clear() loading.value = ElLoading.service({ lock: true, text: '正在加载系统中...', @@ -329,7 +332,6 @@ replace({ path: redirect.value || permissionStore.addRouters[0].path }) } // 存储 部门信息 - const { wsCache } = useCache() wsCache.set(CACHE_KEY.DEPT, await DeptApi.getSimpleDeptList()) }catch (e){ if(e.code === 1002000016){