12345678910111213141516171819202122232425262728293031323334353637383940 |
- /**
- * 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
- }
|