UNPKG
@daysnap/horn-jssdk
Version:
latest (0.0.18)
0.0.18
0.0.17
0.0.16
0.0.15
0.0.14
0.0.13
0.0.12
0.0.11
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.1
原生容器面向 H5 开发者提供的基于容器应用内的网页开发工具包
github.com/daysnap/jssdk
daysnap/jssdk
@daysnap/horn-jssdk
/
es
/
storage
/
getStorage
/
index.js
16 lines
(15 loc)
•
336 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import
{ call }
from
'../../core'
;
/** * 从本地缓存中异步获取指定 key 的内容。 */
export
const
getStorage
= (
options
) =>
call
({ ...options,
service
:
'storage'
,
action
:
'getStorage'
, }).
then
(
(
res
) =>
{
const
{ data } = res;
if
(data) { res.
data
=
JSON
.
parse
(data); }
return
res; });