getGlobalAppCache 获取指定键全局缓存
getGlobalAppCache^8.0
获取指定键全局缓存,先从内存中获取,如果没有则从磁盘中获取,如果都没有则返回空(数据共享权限范围:app内)
#请求参数
| Prop | Type | Default | Comment | 
|---|---|---|---|
| keys | Array | ['key1','key2',...] | 指定缓存数据的键 | 
说明:
- 不建议使用localStorage、sessionStrorage,页面间数据不共享
- 内存缓存:退出APP,全部内存缓存都被清除
#接口调用示例
const params = {
    "keys": [
        'name'
    ]	
}
this.$bridge
  .getGlobalAppCache(params)
  .then(res => {
    this.$alert(res)
  })
  .catch(err => {
    this.$toast(err)
  })
#接口返回示例
{
    "code": 0,
    "msg": "成功"
}
 
                    
                     
                    
                 
                    
                 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号