king
2022-02-09 d59f518f466274b2caeb2e01c10c92deafe7c93b
src/api/cacheutils.js
@@ -43,6 +43,26 @@
  }
  /**
   * @description 清空函数
   */
  static clearFuncs (sysType) {
    if (sysType !== 'local' || window.GLOB.systemType !== '') return
    if (window.GLOB.WebSql) {
      window.GLOB.WebSql.transaction(tx => {
        tx.executeSql('DELETE FROM FUNCS')
        tx.executeSql(`UPDATE VERSIONS SET createDate='1970-01-01 14:59:09.000' where CDefine1='funcs'`)
      })
    } else if (window.GLOB.IndexDB) {
      let objectStore = window.GLOB.IndexDB.transaction(['funcs'], 'readwrite').objectStore('funcs')
      objectStore.clear()
      let funcStore = window.GLOB.IndexDB.transaction(['version'], 'readwrite').objectStore('version')
      funcStore.put({id: 'funcs', version: '1.0', createDate: '1970-01-01 14:59:09.000'})
    }
  }
  /**
   * @description 获取websql中保存信息版本
   */
  static getWebSqlVersion () {