123456789101112131415161718192021222324252627282930 |
- "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;
|