| | |
| | | } |
| | | |
| | | /** |
| | | * @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 () { |