Blogger Information
Blog 8
fans 0
comment 1
visits 6082
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
数据缓存
嫩嫩小宝的博客
Original
718 people have browsed it

当用户无法连接到服务器时,可以调用本地的数据缓存来查看部分内容

QQ图片20171113203707.png

wx.setStorageSync(key,data)

将 data 存储在本地缓存中指定的 key 中,会覆盖掉原来该 key 对应的内容,这是一个同步接口

wx.setStorage({
      key:"key",
     data:"value"})

将data以覆盖的方式存储到key中,其中  success  fail   complete分别为接口调用成功、失败、完成时的回调函数


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post