|
|
@ -26,7 +26,7 @@ const sessionCache = { |
|
|
|
let storage = storageStr ? JSON.parse(storageStr) : {} |
|
|
|
let storage = storageStr ? JSON.parse(storageStr) : {} |
|
|
|
return storage[key] |
|
|
|
return storage[key] |
|
|
|
}, |
|
|
|
}, |
|
|
|
remove(key) { |
|
|
|
delete(key) { |
|
|
|
if (!sessionStorage) { |
|
|
|
if (!sessionStorage) { |
|
|
|
return null |
|
|
|
return null |
|
|
|
} |
|
|
|
} |
|
|
@ -62,7 +62,7 @@ const localCache = { |
|
|
|
let storage = storageStr ? JSON.parse(storageStr) : {} |
|
|
|
let storage = storageStr ? JSON.parse(storageStr) : {} |
|
|
|
return storage[key] |
|
|
|
return storage[key] |
|
|
|
}, |
|
|
|
}, |
|
|
|
remove(key) { |
|
|
|
delete(key) { |
|
|
|
if (!localStorage) { |
|
|
|
if (!localStorage) { |
|
|
|
return null |
|
|
|
return null |
|
|
|
} |
|
|
|
} |
|
|
|