const state = {
  applyType:'',
  applyId:''
}
const mutations = {
  SET_APPLYTYPE: (state, { key, value }) => {
    if (key !== null && key !== "") {
      state.applyType = value
    }
  },
  SET_APPLYID: (state, { key, value }) => {
    if (key !== null && key !== "") {
      state.applyId = value
    }
  }
}

const actions = {
  // 设置字典
  setApplyType({ commit }, data) {
    commit('SET_APPLYTYPE', data)
  },
  // 设置字典
  setApplyId({ commit }, data) {
    localStorage.setItem('applyId', data.value)
    commit('SET_APPLYID', data)
  },
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}

