diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue index b6ee7bea1..c522ad7b3 100644 --- a/src/views/login/components/LoginForm.vue +++ b/src/views/login/components/LoginForm.vue @@ -298,6 +298,9 @@ import { getSwitchByCode } from '@/api/wms/switch' getCode() return } + const { wsCache } = useCache() + // 登陆成功先清空遗留的缓存 + wsCache.clear() loading.value = ElLoading.service({ lock: true, text: '正在加载系统中...', @@ -331,7 +334,6 @@ import { getSwitchByCode } from '@/api/wms/switch' replace({ path: redirect.value || permissionStore.addRouters[0].path }) } // 存储 部门信息 - const { wsCache } = useCache() wsCache.set(CACHE_KEY.DEPT, await DeptApi.getSimpleDeptList()) await getSwitchByCode("ShowPackingNumber").then((res) => { wsCache.set('ShowPackingNumber', res == 'TRUE' ? true : false)