每个微信小程序都可以有自己的本地缓存,可以通过一下操作对本地缓存进行读写和清理。
1、存储本地数据
wx.setStorage/wx.setStorageSync
2、获取本地数据
wx.getStorage/wx.getStorageSync
3、清除本地数据
wx.clearStorage/wx.clearStorageSync
4、清除本地数据的存储地址(清库)
wx.removeStorage/wx.removeStorageSync
每个微信小程序都可以有自己的本地缓存,可以通过一下操作对本地缓存进行读写和清理。
1、存储本地数据
wx.setStorage/wx.setStorageSync
2、获取本地数据
wx.getStorage/wx.getStorageSync
3、清除本地数据
wx.clearStorage/wx.clearStorageSync
4、清除本地数据的存储地址(清库)
wx.removeStorage/wx.removeStorageSync