3 lines
809 B
JavaScript
3 lines
809 B
JavaScript
"use strict";const r=require("../common/vendor.js");function a(e,t){try{r.index.setStorageSync(e,JSON.stringify(t))}catch(o){r.index.__f__("error","at utils/storage.js:14",`setStorage [${e}] 失败:`,o)}}function n(e,t=null){try{const o=r.index.getStorageSync(e);return o?JSON.parse(o):t}catch(o){return r.index.__f__("error","at utils/storage.js:32",`getStorage [${e}] 失败:`,o),t}}function g(e){try{r.index.removeStorageSync(e)}catch(t){r.index.__f__("error","at utils/storage.js:45",`removeStorage [${e}] 失败:`,t)}}function c(){try{r.index.clearStorageSync()}catch(e){r.index.__f__("error","at utils/storage.js:56","clearStorage 失败:",e)}}exports.clearStorage=c;exports.getStorage=n;exports.removeStorage=g;exports.setStorage=a;
|
|
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/storage.js.map
|