mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 19:23:26 +00:00
perf: 优化缓存
This commit is contained in:
parent
529b8b682f
commit
0077925fc0
7
resources/assets/js/store/actions.js
vendored
7
resources/assets/js/store/actions.js
vendored
@ -15,13 +15,10 @@ export default {
|
|||||||
if (!initTag) {
|
if (!initTag) {
|
||||||
await $A.IDBSet("initTag", true)
|
await $A.IDBSet("initTag", true)
|
||||||
const userInfo = $A.getStorageJson("userInfo")
|
const userInfo = $A.getStorageJson("userInfo")
|
||||||
const cacheServerUrl = $A.getStorageString("cacheServerUrl")
|
|
||||||
window.localStorage.clear()
|
|
||||||
if (userInfo.userid > 0) {
|
if (userInfo.userid > 0) {
|
||||||
await $A.IDBSet("userInfo", userInfo)
|
await $A.IDBSet("userInfo", userInfo)
|
||||||
}
|
await $A.IDBSet("cacheServerUrl", $A.getStorageString("cacheServerUrl"))
|
||||||
if (/^https*:\/\//i.test(cacheServerUrl)) {
|
window.localStorage.clear()
|
||||||
await $A.IDBSet("cacheServerUrl", cacheServerUrl)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user