|
@@ -20,6 +20,10 @@ const setDict = (type, val, cacheTime = 7200) => {
|
|
}
|
|
}
|
|
|
|
|
|
export const getDict = (type, params, apiType = 'dict') => {
|
|
export const getDict = (type, params, apiType = 'dict') => {
|
|
|
|
+ if (!type) {
|
|
|
|
+ console.error('type不存在', type, params, apiType)
|
|
|
|
+ return []
|
|
|
|
+ }
|
|
return new Promise((resolve) => {
|
|
return new Promise((resolve) => {
|
|
const item = localStorage.getItem(type)
|
|
const item = localStorage.getItem(type)
|
|
const catchData = item ? JSON.parse(item) : null
|
|
const catchData = item ? JSON.parse(item) : null
|