12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- "use strict";
- const StorageController = {
- async: 0,
- getItem(path
-
- )
-
- {
- return wx.getStorageSync(path);
- },
- setItem(path
-
- , value
-
- ) {
- try {
- wx.setStorageSync(path, value);
- } catch (e) {
- }
- },
- removeItem(path
-
- ) {
- wx.removeStorageSync(path);
- },
- getAllKeys() {
- const res = wx.getStorageInfoSync();
- return res.keys;
- },
- clear() {
- wx.clearStorageSync();
- }
- };
- module.exports = StorageController;
|