|
@@ -13,9 +13,6 @@ import { getSecondNodes } from '@/utils/dealData'
|
|
|
|
|
|
// const setDict = (type, val, cacheTime = 7200) => {
|
|
|
const setDict = (type, val) => {
|
|
|
- if (type === 'positionSecondData') {
|
|
|
- val = getSecondNodes(val)
|
|
|
- }
|
|
|
// 一小时过期
|
|
|
const currentTime = new Date()
|
|
|
currentTime.setTime(currentTime.getTime() + 3600 * 1000)
|
|
@@ -62,6 +59,9 @@ export const getDict = (type, params, apiType = 'dict') => {
|
|
|
return e
|
|
|
}) : []
|
|
|
}
|
|
|
+ if (type === 'positionSecondData') {
|
|
|
+ data = getSecondNodes(data)
|
|
|
+ }
|
|
|
setDict(type, data)
|
|
|
resolve({ data })
|
|
|
})
|