
                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/module/Storage/Storage.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, '1002938VFRJd70RiAno9Iys', 'Storage');
// Script/module/Storage/Storage.ts

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StorageMessage = void 0;
//缓存浏览器数据
var StorageMessage = {
    getStorage: function (key) {
        var result = null;
        if (cc.sys.localStorage.getItem(key)) {
            var result = cc.sys.localStorage.getItem(key);
        }
        if (result) {
            result = JSON.parse(result);
        }
        return result;
    },
    setStorage: function (key, value) {
        //主动拉起分享接口
        var temp = JSON.stringify(value);
        cc.sys.localStorage.setItem(key, temp);
    },
    removeStorage: function (key) {
        //主动删除消息接口
        if (cc.sys.localStorage.getItem(key)) {
            cc.sys.localStorage.removeItem(key);
        }
    },
};
exports.StorageMessage = StorageMessage;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxtb2R1bGVcXFN0b3JhZ2VcXFN0b3JhZ2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsU0FBUztBQUNULElBQUksY0FBYyxHQUFHO0lBQ2pCLFVBQVUsRUFBRyxVQUFTLEdBQUc7UUFDckIsSUFBSSxNQUFNLEdBQUcsSUFBSSxDQUFDO1FBQ2xCLElBQUcs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