king
2025-01-10 dfdcdcb3dbd0b711bc0b77bb00fd1d39af91bd0b
src/api/cacheutils.js
@@ -27,9 +27,9 @@
        if (!window.GLOB.IndexDB.objectStoreNames.contains('caches')) {
          window.GLOB.IndexDB.createObjectStore('caches', { keyPath: 'menuid' })
        }
        if (!window.GLOB.IndexDB.objectStoreNames.contains('funcs')) {
          window.GLOB.IndexDB.createObjectStore('funcs', { keyPath: 'id' })
        }
        // if (!window.GLOB.IndexDB.objectStoreNames.contains('funcs')) {
        //   window.GLOB.IndexDB.createObjectStore('funcs', { keyPath: 'id' })
        // }
      }
    } catch (e) {
      console.warn('IndexedDB 初始化失败!')
@@ -234,7 +234,7 @@
      request.onsuccess = (e) => {
        let cursor = e.target.result
        if (cursor) {
          if (cursor.value.CreateDate < date) {
          if (cursor.value.CreateDate < date || cursor.value.CreateDate.length === 10) {
            cursor.delete()
          }
          cursor.continue()