wx.getStorageInfoSync-同步获取当前storage的相关信息

wx.getStorageInfoSync

同步获取当前storage的相关信息


示例代码:

try {
    var res = wx.getStorageInfoSync()
    console.log(res.keys)
    console.log(res.currentSize)
    console.log(res.limitSize)
} catch (e) {
    // Do something when catch error
}