diff --git a/src/page/check/chose.vue b/src/page/check/chose.vue index b3c46de..591ea49 100644 --- a/src/page/check/chose.vue +++ b/src/page/check/chose.vue @@ -350,10 +350,6 @@ export default { this.$message.warning("您已经被禁用"); return; } - // if(item.residueTime<=0){ - // this.$message.warning('您已过期') - // return - // } if (this.flag == 1) { localStorage.setItem("agentId", item.id); localStorage.setItem("orgCode", ""); @@ -375,6 +371,7 @@ export default { } this.$router.push({ path: "/wel" }); localStorage.setItem("allClose", true); + this.$db.deleteDB('EquipmentStateFiltter') }, addLoginCount(houseId) { this.$api.api diff --git a/src/util/indexedDb/indexedDB.js b/src/util/indexedDb/indexedDB.js index fef5ca1..71a8579 100644 --- a/src/util/indexedDb/indexedDB.js +++ b/src/util/indexedDb/indexedDB.js @@ -146,5 +146,21 @@ class IndexDBCache { return value; } + + // 删除indexDB + deleteDB(id) { + let transaction = this._db.transaction(this._cacheTableName, 'readwrite') + let store = transaction.objectStore(this._cacheTableName) + let request = store.delete(id) + + request.onsuccess = function() { + console.log('数据删除成功') + } + + request.onerror = function() { + console.log('数据删除失败') + } + } + } export default IndexDBCache \ No newline at end of file diff --git a/src/views/Statistics/TheTeamCompared.vue b/src/views/Statistics/TheTeamCompared.vue index 7788355..985963b 100644 --- a/src/views/Statistics/TheTeamCompared.vue +++ b/src/views/Statistics/TheTeamCompared.vue @@ -602,7 +602,7 @@