讀取 wx.getStorage wx.getStorageSync
刪除 wx.removeStorage wx.removeStorageSync
清空 wx.clearStorage wx.clearStorageSync
獲取緩存信息 wx.getStorageInfo wx.getStorageInfoSync
以Sync結尾都是同步方法。同步方法和異步方法的區別是:
同步方法會堵塞當前任務,直到同步方法處理返回。
異步方法不會塞當前任務。
讀取 wx.getStorage wx.getStorageSync
刪除 wx.removeStorage wx.removeStorageSync
清空 wx.clearStorage wx.clearStorageSync
獲取緩存信息 wx.getStorageInfo wx.getStorageInfoSync
以Sync結尾都是同步方法。同步方法和異步方法的區別是:
同步方法會堵塞當前任務,直到同步方法處理返回。
異步方法不會塞當前任務。