| | |
| | | 1589782279158ngr675kk3oksin35sul,1589788042787ffdt9hle4s45k9r1nvs,15900310928174dro07ihfckghpb5h13,1594095599055qicg2eb642v5qglhnuo,1599613340050c8nu6rbst9d4emnnbsq,1577972969199lei1g0qkvlh4tkc908m, |
| | | 1578479100252lfbp29v1kafk4s4q4ig,1577971621421tg4v0i1ur8873k7e0ob,1577929944419lgc5h3hepum765e2k7u,1588493493409k9guqp067d31lu7blsv` |
| | | |
| | | if (window.openDatabase) { |
| | | if (!window.openDatabase) { |
| | | CacheUtils.openWebSql() |
| | | } else if (window.indexedDB) { |
| | | CacheUtils.openIndexDB() |
| | |
| | | * @description 删除某个菜单配置信息 |
| | | */ |
| | | deleteMenuStorage (menuId) { |
| | | return CacheUtils.delMenuWebSqlConfig(menuId) |
| | | if (window.GLOB.IndexDB) { |
| | | let key = menuId + (sessionStorage.getItem('UserID') || '') |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true' && options.cloudServiceApi) { |
| | | key = menuId + (sessionStorage.getItem('CloudUserID') || '') |
| | | } |
| | | |
| | | return CacheUtils.delMenuIndexDBConfig(key) |
| | | } else { |
| | | return CacheUtils.delMenuWebSqlConfig(menuId) |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | }) |
| | | }) |
| | | }) |
| | | } else if (window.GLOB.IndexDB) { |
| | | return new Promise(resolve => { |
| | | CacheUtils.getIndexDBMenuConfig(param.MenuID, param.userid).then(res => { |
| | | resolve(res) |
| | | }, () => { |
| | | param = this.encryptParam(param) |
| | | axios({ |
| | | url: `/webapi/dostars${param.func ? '/' + param.func : ''}`, |
| | | method: 'post', |
| | | data: param |
| | | }).then(res => { |
| | | if (res.status && window.GLOB.IndexDB) { |
| | | let msg = { |
| | | ...res, |
| | | userid: param.userid, |
| | | menuid: param.MenuID, |
| | | id: param.MenuID + param.userid |
| | | } |
| | | CacheUtils.writeInIndexDB(msg) |
| | | } else if (res.status) { |
| | | window.GLOB.CacheMap.set(_param, res) |
| | | } |
| | | resolve(res) |
| | | }) |
| | | }) |
| | | }) |
| | | } else if (window.GLOB.CacheMap.has(_param)) { |
| | | return Promise.resolve(window.GLOB.CacheMap.get(_param)) |
| | | } else { |