import Server from './server'
import Cache from './cache'

//缓存
let Storage = {}

///缓存前缀
Cache.preKey = Server.version

/**
 * 测试属性 
 * 设置：this.$global.test = 'xx'
 * 调用：let test = this.$global.test
 */
Cache.defineProperty(Storage, 'test')

/**
 * search页面 历史搜索 组织数据：
 * @prop {Array} history 数组形式
 *    @prop {int} id 分类id 
 *    @prop {string} keyword 关键字
 */
Cache.defineProperty(Storage, 'history')

Cache.defineProperty(Storage,'selectAddressStatus')
Cache.defineProperty(Storage,'selectAddress')
Cache.defineProperty(Storage,'couponObj')

export default Storage