# getStorage
获取App本地存储数据,支持自动JSON解析
# 请求参数
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
key | String | Y | - | 存储的key |
# 参数代码示例
// 获取iService Token
this.$bridge.getStorage('iServiceToken').then(res => {
console.log(res)
})
// 获取语言信息
this.$bridge.getStorage('language').then(res => {
console.log(res)
})
// 获取通用数据
this.$bridge.getStorage('COMMON_DCP_DATA_V3').then(storageData => {
console.log(storageData)
})
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
# 返回参数
- 返回存储的值,不存在时返回 undefined