uniapp获取缓存数据
时间: 2023-08-08 17:12:02 浏览: 302
uniapp英文新闻app-DEMO演示
在uniapp中,可以使用uni.getStorageSync()方法来获取缓存数据。该方法可以同步获取本地缓存数据,数据以key-value的形式存储在本地。你可以通过传入缓存的名字作为参数来获取对应的缓存数据。例如,使用uni.getStorageSync('myName')可以获取名为'myName'的缓存数据。\[2\]\[3\]
#### 引用[.reference_title]
- *1* *3* [uniapp缓存方式](https://blog.csdn.net/m0_59910554/article/details/130522020)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [uni设置缓存、获取缓存、控制台查看缓存](https://blog.csdn.net/xulihua_75/article/details/125951477)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文