Prechádzať zdrojové kódy

处理positionSecondData

lifanagju_citu 6 mesiacov pred
rodič
commit
572fcff9bc
1 zmenil súbory, kde vykonal 3 pridanie a 3 odobranie
  1. 3 3
      hooks/useDictionaries.js

+ 3 - 3
hooks/useDictionaries.js

@@ -47,9 +47,6 @@ const setDict = (type, val) => {
       }
     }
   }
-  if (type === 'positionSecondData') {
-    val.data = getSecondNodes(val.data)
-  }
   // 一小时过期
   const currentTime = new Date()
   currentTime.setTime(currentTime.getTime() + 3600 * 1000)
@@ -88,6 +85,9 @@ export const getDict = (type, params, apiType = 'dict') => {
       }
       apiFn[apiType](query).then(data => {
         // setDict(type, data, Date.now())
+        if (type === 'positionSecondData') {
+          data.data = getSecondNodes(data.data)
+        }
         setDict(type, data)
         resolve({ data })
       })