storage.js 641 B

1234567891011121314151617181920212223242526272829
  1. import Server from './server'
  2. import Cache from './cache'
  3. //缓存
  4. let Storage = {}
  5. ///缓存前缀
  6. Cache.preKey = Server.version
  7. /**
  8. * 测试属性
  9. * 设置:this.$global.test = 'xx'
  10. * 调用:let test = this.$global.test
  11. */
  12. Cache.defineProperty(Storage, 'test')
  13. /**
  14. * search页面 历史搜索 组织数据:
  15. * @prop {Array} history 数组形式
  16. * @prop {int} id 分类id
  17. * @prop {string} keyword 关键字
  18. */
  19. Cache.defineProperty(Storage, 'history')
  20. Cache.defineProperty(Storage,'selectAddressStatus')
  21. Cache.defineProperty(Storage,'selectAddress')
  22. Cache.defineProperty(Storage,'couponObj')
  23. export default Storage