import storage from '../../utils/storage'

const user = {
  state: {
    id: storage.get('vuex_id'),
    areaCode: storage.get('vuex_areaCode')
  },
  mutations: {
    SET_ID(state, id) {
      state.id = id
      storage.set('vuex_id', id)
    },
    SET_AREACODE(state, areaCode) {
      state.areaCode = areaCode
      storage.set('vuex_areaCode', areaCode)
    }
  }
}
export default user
