企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[TOC] #### H5 本地存储 1. 设置缓存 ~~~ // 数据存入缓存 // JSON.stringify 对象转换为字符串 window.localStorage.setItem('hotList', JSON.stringify(hotList)); window.localStorage.setItem('cityList', JSON.stringify(cityList)); ~~~ 2. 获取缓存 ~~~ // 获取缓存 // JSON.parse JSON字符串转对象 const hotList = JSON.parse(window.localStorage.getItem('hotList')); const cityList = JSON.parse(window.localStorage.getItem('cityList')); ~~~