|
@@ -87,7 +87,7 @@ const applySystemList = (data: any[]) => {
|
|
|
|
|
|
|
|
async function getSystemList(type = false) {
|
|
async function getSystemList(type = false) {
|
|
|
const cached = getCache()
|
|
const cached = getCache()
|
|
|
- console.log(1)
|
|
|
|
|
|
|
+ console.log(1,type)
|
|
|
if (!type){
|
|
if (!type){
|
|
|
if (cached && cached.timestamp && Date.now() - cached.timestamp < CACHE_DURATION) {
|
|
if (cached && cached.timestamp && Date.now() - cached.timestamp < CACHE_DURATION) {
|
|
|
applySystemList(cached.data || [])
|
|
applySystemList(cached.data || [])
|
|
@@ -99,6 +99,7 @@ async function getSystemList(type = false) {
|
|
|
try {
|
|
try {
|
|
|
const res: any = await customApi.getSystemList({})
|
|
const res: any = await customApi.getSystemList({})
|
|
|
if (res && res.code === Code.StatusOK) {
|
|
if (res && res.code === Code.StatusOK) {
|
|
|
|
|
+ console.log(res.data,'sys')
|
|
|
const data = res.data || []
|
|
const data = res.data || []
|
|
|
applySystemList(data)
|
|
applySystemList(data)
|
|
|
setCache(data)
|
|
setCache(data)
|