From bbcb3f45ad0ef4c808bf5a68ec10c0464c094e2f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 27 十月 2021 11:51:40 +0800
Subject: [PATCH] Merge branch 'master' into bms

---
 src/api/cacheutils.js |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/api/cacheutils.js b/src/api/cacheutils.js
index aa742fc..3a983a0 100644
--- a/src/api/cacheutils.js
+++ b/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 () {

--
Gitblit v1.8.0