mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 02:08:43 +08:00 
			
		
		
		
	refactor: dict
This commit is contained in:
		| @@ -12,6 +12,9 @@ import { useUserStoreWithOut } from '@/store/modules/user' | ||||
| import { listSimpleDictDataApi } from '@/api/system/dict/dict.data' | ||||
| import { isRelogin } from '@/config/axios/service' | ||||
| import { getInfoApi } from '@/api/login' | ||||
| import { useCache } from '@/hooks/web/useCache' | ||||
|  | ||||
| const { wsCache } = useCache() | ||||
|  | ||||
| const { start, done } = useNProgress() | ||||
|  | ||||
| @@ -47,7 +50,8 @@ router.beforeEach(async (to, from, next) => { | ||||
|       const dictStore = useDictStoreWithOut() | ||||
|       const userStore = useUserStoreWithOut() | ||||
|       const permissionStore = usePermissionStoreWithOut() | ||||
|       if (!dictStore.getHasDictData) { | ||||
|       const dictMap = wsCache.get('dictCache') | ||||
|       if (!dictMap) { | ||||
|         const res = await listSimpleDictDataApi() | ||||
|         dictStore.setDictMap(res) | ||||
|       } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 xingyu
					xingyu