king
2024-08-20 58826d6f4eab9f8c9acf9fa8696f60039c645cfe
src/api/cacheutils.js
@@ -7,7 +7,7 @@
   */
  static openIndexDB (db) {
    try {
      let request = window.indexedDB.open(db, 2)
      let request = window.indexedDB.open(db, 3)
      request.onerror = () => {
        console.warn('IndexedDB 初始化失败!')
      }
@@ -27,9 +27,9 @@
        if (!window.GLOB.IndexDB.objectStoreNames.contains('caches')) {
          window.GLOB.IndexDB.createObjectStore('caches', { keyPath: 'menuid' })
        }
        if (window.GLOB.systemType === '' && !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()