/** * Created by zack on 2018/1/25. */ const GlobalUserStorageTool = { load: (key, response, error) => { global.storage.load({ key: key, autoSync: true, syncInBackground: true, }).then(ret => { response(ret) }).catch((err) => { error(err) }) }, save:(key, obj) => { global.storage.save({ key: key, data: obj }) }, remove: (key) => { global.storage.remove({ key: key }) } } const UserStorageKey = { UserInfo: 'UserInfo', AccountAndPassword: 'AccountAndPassword' } export { GlobalUserStorageTool, UserStorageKey }